Revision ad91075ffdead7446438c989400d86663fe79d20 authored by Anne van Kesteren on 12 April 2018, 11:25:13 UTC, committed by Anne van Kesteren on 12 April 2018, 11:25:13 UTC
Needed for https://github.com/whatwg/fetch/issues/664 and https://github.com/whatwg/fetch/pull/600.
1 parent 19a42b9
storage_builtins.html
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>WebStorage Test: Storage - builtins</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_equals(storage.length, 0, "storage.length");
var builtins = ["key", "getItem", "setItem", "removeItem", "clear"];
var origBuiltins = builtins.map(function(b) { return Storage.prototype[b]; });
assert_array_equals(builtins.map(function(b) { return storage[b]; }), origBuiltins, "a");
builtins.forEach(function(b) { storage[b] = b; });
assert_array_equals(builtins.map(function(b) { return storage[b]; }), origBuiltins, "b");
assert_array_equals(builtins.map(function(b) { return storage.getItem(b); }), builtins, "c");
assert_equals(storage.length, builtins.length, "storage.length");
}, "Builtins in " + name);
});
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...