Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: LayoutTests/imported/web-platform-tests/webstorage/event_session_storageeventinit.html

Issue 1220543007: Import web-platform-tests/webstorage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>WebStorage Test: sessionStorage event - StorageEventInit</title>
5 <script src="../../../resources/testharness.js"></script>
6 <script src="../../../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <h1>event_session_StorageEventInit</h1>
10 <div id="log"></div>
11 <script>
12 test(function() {
13 var t = async_test("storageeventinit test");
14 function onStorageEvent(event) {
15 t.step(function() {
16 assert_equals(event.key, 'key');
17 assert_equals(event.oldValue, 'oldValue');
18 assert_equals(event.newValue, 'newValue');
19 assert_equals(event.url, window.location.href);
20 assert_equals(event.storageArea, window.sessionStorage);
21 });
22 t.done();
23 }
24
25 window.addEventListener('storage', onStorageEvent, false);
26
27 var event = new StorageEvent('storage', {
28 key: 'key',
29 oldValue: 'oldValue',
30 newValue: 'newValue',
31 url: window.location.href,
32 storageArea: window.sessionStorage
33 });
34
35 window.dispatchEvent(event);
36 }, "Storage event is fired due to set values for StorageEventInit.");
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698