Index: LayoutTests/http/tests/security/cross-frame-access-location-get.html |
diff --git a/LayoutTests/http/tests/security/cross-frame-access-location-get.html b/LayoutTests/http/tests/security/cross-frame-access-location-get.html |
index 6fa5ec4f2573f32fe76263736809bcdac7238e1f..9f17799e214248b4db9e845cf23fa3fb2e7e907b 100644 |
--- a/LayoutTests/http/tests/security/cross-frame-access-location-get.html |
+++ b/LayoutTests/http/tests/security/cross-frame-access-location-get.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 frame 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() |