mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Renames webstorage test
This commit is contained in:
parent
94816bb3b4
commit
2fb66db401
2 changed files with 14 additions and 3 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset=utf-8>
|
||||
<title>Storage Test: Supported property names</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
["localStorage", "sessionStorage"].forEach(function(name) {
|
||||
test(function() {
|
||||
var storage = window[name];
|
||||
storage.clear();
|
||||
|
||||
storage["name"] = "user1";
|
||||
assert_array_equals(Object.getOwnPropertyNames(storage), ['name']);
|
||||
}, "Object.getOwnPropertyNames on " + name + " Storage");
|
||||
|
||||
test(function() {
|
||||
var storage = window[name];
|
||||
storage.clear();
|
||||
assert_array_equals(Object.getOwnPropertyNames(storage), []);
|
||||
}, "Object.getOwnPropertyNames on " + name + " storage with empty collection");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue