mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Automatic update from web-platform-testsTest initStorageEvent() Follows https://github.com/whatwg/html/pull/4063. -- Consolidate/simplify StorageEvent constructor tests The use of `async_test` was already unnecessary as `dispatchEvent` synchronously invokes listeners, and use of `dispatcEvent` itself is not necessary to test the constructor, so simplify to just `test`s. -- wpt-commits: c4fce5c3c37e30b192a596c4dc779e4192f1bc12, bd5f3403f34f8e83eecbdc172cd330039e12ab86 wpt-pr: 13368
30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>WebStorage Test: missing arguments</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
var tests = [
|
|
function() { localStorage.key(); },
|
|
function() { localStorage.getItem(); },
|
|
function() { localStorage.setItem(); },
|
|
function() { localStorage.setItem("a"); },
|
|
function() { localStorage.removeItem(); },
|
|
function() { sessionStorage.key(); },
|
|
function() { sessionStorage.getItem(); },
|
|
function() { sessionStorage.setItem(); },
|
|
function() { sessionStorage.setItem("a"); },
|
|
function() { sessionStorage.removeItem(); },
|
|
];
|
|
tests.forEach(function(fun) {
|
|
test(function() {
|
|
assert_throws(new TypeError(), fun);
|
|
}, "Should throw TypeError for " + format_value(fun) + ".");
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|