Revision 9454b8e581454d3bf0dabb368f4cf90c8e3dcc6c authored by Geoffrey Sneddon on 27 August 2018, 16:01:41 UTC, committed by James Graham on 14 November 2018, 11:37:48 UTC
1 parent beb9940
storage_in.html
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>WebStorage Test: Storage - in operator</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();
assert_false("name" in storage);
storage["name"] = "user1";
assert_true("name" in storage);
}, "The in operator in " + name + ": property access");
test(function() {
var storage = window[name];
storage.clear();
assert_false("name" in storage);
storage.setItem("name", "user1");
assert_true("name" in storage);
assert_equals(storage.name, "user1");
storage.removeItem("name");
assert_false("name" in storage);
}, "The in operator in " + name + ": method access");
});
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...