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

Side by Side Diff: LayoutTests/imported/web-platform-tests/webstorage/event_session_oldvalue.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 - oldValue</title>
5 <script src="../../../resources/testharness.js"></script>
6 <script src="../../../resources/testharnessreport.js"></script>
7 <script>
8 function fail(msg) {
9 t.step(function() {
10 assert_unreached(msg);
11 });
12 t.done();
13 }
14 </script>
15 </head>
16 <body>
17 <h1>event_session_oldValue</h1>
18 <div id="log"></div>
19 <script>
20 var t = async_test("oldvalue property test of session event");
21
22 test(function() {
23 sessionStorage.clear();
24 var expected = [null, 'user1', null]
25 function onStorageEvent(event) {
26 t.step(function() {
27 assert_equals(event.oldValue, expected.shift());
28 });
29 if (!expected.length) {
30 t.done();
31 }
32 }
33
34 window.addEventListener('storage', onStorageEvent, false);
35
36 var el = document.createElement("iframe");
37 el.setAttribute('id', 'ifrm');
38 el.setAttribute('src', 'resources/session_change_item_iframe.html');
39 document.body.appendChild(el);
40 }, "Session event is fired due to an invocation of the setItem(), clear( ) methods.");
41 </script>
42 </body>
43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698