blob: 84b4bd0871ccee7a39a9ccbbd9946fe04e47d447 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!DOCTYPE HTML>
<html>
<head>
<title>Web Storage</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>storage_local_clear</h1>
<div id="log"></div>
<script>
test(function() {
localStorage.clear();
localStorage.setItem("name", "user1");
assert_not_equals(localStorage.name, undefined);
assert_equals(localStorage.length, 1);
localStorage.clear();
assert_equals(localStorage.name, undefined, "localStorage.name")
assert_equals(localStorage.length, 0, "localStorage.length")
});
</script>
</body>
</html>
|