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

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-get-override.html

Issue 494343003: Eliminate globalFlag usage from http security layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistify Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/cross-frame-access-get-override.html
diff --git a/LayoutTests/http/tests/security/cross-frame-access-get-override.html b/LayoutTests/http/tests/security/cross-frame-access-get-override.html
index 98d2ec7807f55bbc0c07d2f4fb552e15b81a9ee1..b69d89a1756d52a6e0f9715b50da0a8bf1b18503 100644
--- a/LayoutTests/http/tests/security/cross-frame-access-get-override.html
+++ b/LayoutTests/http/tests/security/cross-frame-access-get-override.html
@@ -9,25 +9,11 @@
testRunner.waitUntilDone();
}
- if (window.testRunner) {
- setTimeout(pollForTest, 1);
- } else {
- log("To run the test, click the button below when the opened window finishes loading.");
- var button = document.createElement("button");
- button.appendChild(document.createTextNode("Run Test"));
- button.onclick = runTest;
- document.body.appendChild(button);
- }
- }
-
- pollForTest = function()
- {
- if (!testRunner.globalFlag) {
- setTimeout(pollForTest, 1);
- return;
- }
- runTest();
- testRunner.notifyDone();
+ window.addEventListener('message', function () {
+ runTest();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
}
runTest = function()

Powered by Google App Engine
This is Rietveld 408576698