Index: LayoutTests/http/tests/security/cross-frame-access-location-get-override.html |
diff --git a/LayoutTests/http/tests/security/cross-frame-access-location-get-override.html b/LayoutTests/http/tests/security/cross-frame-access-location-get-override.html |
index f6573ec84ce59aa0afd677561c94412cdd92e1b9..943eb9b25e5ceb3cc94526dff64eedcee44b3d4a 100644 |
--- a/LayoutTests/http/tests/security/cross-frame-access-location-get-override.html |
+++ b/LayoutTests/http/tests/security/cross-frame-access-location-get-override.html |
@@ -9,25 +9,12 @@ |
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() |