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

Unified Diff: third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js

Issue 2538773003: Deflake storage/domstorage/events tests when run in random order (Closed)
Patch Set: Rebased Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js
diff --git a/third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js b/third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js
index 691f02caf1a1ca2ee1416a7afd89ae953a263ead..070465c912fafeed4c13e9b01b45705ac886a6d6 100644
--- a/third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js
+++ b/third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js
@@ -15,7 +15,17 @@ function test(storageString, callback)
evalAndLog("storage.clear()");
shouldBe("storage.length", "0");
- runAfterNStorageEvents(step1, 0);
+ iframe.onload = onload;
+ iframe.src = "about:blank";
+}
+
+function onload()
+{
+ iframe.contentWindow.onstorage = function (e) {
+ window.parent.storageEventList.push(e);
+ };
+
+ step1();
}
function step1()
@@ -79,7 +89,7 @@ function step5()
shouldBeEqualToString("storageEventList[6].oldValue", "BAR");
shouldBeNull("storageEventList[6].newValue");
evalAndLog("storage.clear()");
-
+
runAfterNStorageEvents(step6, 8);
}
@@ -89,7 +99,7 @@ function step6()
shouldBeNull("storageEventList[7].key");
shouldBeNull("storageEventList[7].oldValue");
shouldBeNull("storageEventList[7].newValue");
-
+
completionCallback();
}

Powered by Google App Engine
This is Rietveld 408576698