Files
firefox/testing/web-platform/tests/webstorage/missing_arguments.html
T
Philip Jägenstedt 411f85a473 Bug 1496735 [wpt PR 13368] - Test StorageEvent constructor and initStorageEvent(), a=testonly
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
2018-10-12 16:44:34 +00:00

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>