| Index: LayoutTests/imported/web-platform-tests/webstorage/event_session_newvalue.html
|
| diff --git a/LayoutTests/imported/web-platform-tests/webstorage/event_session_newvalue.html b/LayoutTests/imported/web-platform-tests/webstorage/event_session_newvalue.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..80a15913c5d5702f56d4da6dd9a573f46ca2f877
|
| --- /dev/null
|
| +++ b/LayoutTests/imported/web-platform-tests/webstorage/event_session_newvalue.html
|
| @@ -0,0 +1,43 @@
|
| +<!DOCTYPE HTML>
|
| +<html>
|
| + <head>
|
| + <title>WebStorage Test: sessionStorage event - newValue</title>
|
| + <script src="../../../resources/testharness.js"></script>
|
| + <script src="../../../resources/testharnessreport.js"></script>
|
| + <script>
|
| + function fail(msg) {
|
| + t.step(function() {
|
| + assert_unreached(msg);
|
| + });
|
| + t.done();
|
| + }
|
| + </script>
|
| + </head>
|
| + <body>
|
| + <h1>event_session_newValue</h1>
|
| + <div id="log"></div>
|
| + <script>
|
| + var t = async_test("newvalue property test of session event");
|
| +
|
| + test(function() {
|
| + sessionStorage.clear();
|
| + var expected = ['user1', 'user2', null]
|
| + function onStorageEvent(event) {
|
| + t.step(function() {
|
| + assert_equals(event.newValue, expected.shift());
|
| + });
|
| + if (!expected.length) {
|
| + t.done();
|
| + }
|
| + }
|
| +
|
| + window.addEventListener('storage', onStorageEvent, false);
|
| +
|
| + var el = document.createElement("iframe");
|
| + el.setAttribute('id', 'ifrm');
|
| + el.setAttribute('src', 'resources/session_change_item_iframe.html');
|
| + document.body.appendChild(el);
|
| + }, "Session event is fired due to an invocation of the setItem(), clear() methods.");
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|