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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/webstorage/eventTestHarness.js

Issue 1492283002: Import web-platform-tests@f0a76a0823db8e1eca9039b08d31e136406253b5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Skip Created 5 years 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
OLDNEW
1 iframe = document.createElement("IFRAME"); 1 iframe = document.createElement("IFRAME");
2 iframe.src = "about:blank"; 2 iframe.src = "about:blank";
3 document.body.appendChild(iframe); 3 document.body.appendChild(iframe);
4 iframe.contentWindow.document.body.textContent = "Nothing to see here."; 4 iframe.contentWindow.document.body.textContent = "Nothing to see here.";
5 5
6 storageEventList = new Array(); 6 storageEventList = new Array();
7 iframe.contentWindow.addEventListener("storage", function(e) { 7 iframe.contentWindow.onstorage = function(e) {
8 window.parent.storageEventList.push(e); 8 window.parent.storageEventList.push(e);
9 }); 9 };
10 10
11 function runAfterNStorageEvents(callback, expectedNumEvents) 11 function runAfterNStorageEvents(callback, expectedNumEvents)
12 { 12 {
13 countStorageEvents(callback, expectedNumEvents, 0) 13 countStorageEvents(callback, expectedNumEvents, 0)
14 } 14 }
15 15
16 function countStorageEvents(callback, expectedNumEvents, times) 16 function countStorageEvents(callback, expectedNumEvents, times)
17 { 17 {
18 function onTimeout() 18 function onTimeout()
19 { 19 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 testCallback("sessionStorage"); 52 testCallback("sessionStorage");
53 var hit = false; 53 var hit = false;
54 add_result_callback(function() { 54 add_result_callback(function() {
55 if (!hit) { 55 if (!hit) {
56 hit = true; 56 hit = true;
57 testCallback("localStorage"); 57 testCallback("localStorage");
58 } 58 }
59 }); 59 });
60 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698