summaryrefslogtreecommitdiffstats
path: root/dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html')
-rw-r--r--dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html b/dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html
new file mode 100644
index 000000000..3bfca4b13
--- /dev/null
+++ b/dom/imptests/webapps/WebStorage/tests/submissions/Ms2ger/test_event_constructor_js.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Web Storage</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h1>event_Constructor</h1>
+ <div id="log"></div>
+ <script>
+ test(function() {
+ var t = async_test("StorageEvent constructor and nulls");
+ function onStorageEvent(event) {
+ t.step(function() {
+ assert_equals(event.type, 'storage', 'type');
+ assert_equals(event.key, null, 'key');
+ assert_equals(event.oldValue, null, 'oldValue');
+ assert_equals(event.newValue, null, 'newValue');
+ assert_equals(event.url, 'null', 'url');
+ assert_equals(event.storageArea, null, 'storageArea');
+ });
+ t.done();
+ }
+
+ window.addEventListener('storage', onStorageEvent, false);
+ var event = new StorageEvent('storage', {
+ key: null,
+ oldValue: null,
+ newValue: null,
+ url: null
+ });
+ window.dispatchEvent(event);
+ });
+ </script>
+ </body>
+</html>