diff options
Diffstat (limited to 'dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html')
-rw-r--r-- | dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html b/dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html new file mode 100644 index 000000000..b81c30921 --- /dev/null +++ b/dom/imptests/webapps/WebStorage/tests/submissions/Infraware/test_event_session_oldvalue.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Web Storage</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function fail(msg) { + t.step(function() { + assert_notreached(msg); + }); + t.done(); + } + </script> + </head> + <body> + <h1>event_session_oldValue</h1> + <div id="log"></div> + <script> + test(function() { + sessionStorage.clear(); + var t = async_test("oldvalue property test of session event"); + var expected = [null, 'user1', null] + function onStorageEvent(event) { + t.step(function() { + assert_equals(event.oldValue, expected.shift()); + }); + if (!expected.length) { + t.done(); + } + } + + window.addEventListener('storage', onStorageEvent, false); + + var el = document.createElement("iframe"); + el.setAttribute('id', 'ifrm'); + el.setAttribute('src', 'iframe/session_change_item_iframe.html'); + document.body.appendChild(el); + }); + </script> + </body> +</html> |