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

Side by Side Diff: LayoutTests/imported/web-platform-tests/webstorage/event_local_url.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: localStorage event - url</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_local_url</h1>
18 <div id="log"></div>
19 <script>
20 var t = async_test("url property test of local event");
21
22 test(function() {
23 localStorage.clear();
24 function onStorageEvent(event) {
25 t.step(function() {
26 var url = window.location.href;
27
28 var pos = url.lastIndexOf("/");
29 if (pos != -1) {
30 url = url.substr(0, pos + 1);
31 url = url + "resources/local_set_item_iframe.html";
32 }
33
34 assert_equals(event.url, url);
35 });
36 t.done();
37 }
38
39 window.addEventListener('storage', onStorageEvent, false);
40
41 var el = document.createElement("iframe");
42 el.setAttribute('id', 'ifrm');
43 el.setAttribute('src', 'resources/local_set_item_iframe.html');
44 document.body.appendChild(el);
45 }, "Local event is fired due to an invocation of the setItem() method.") ;
46 </script>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698