Index: LayoutTests/http/tests/security/cross-frame-access-get.html |
diff --git a/LayoutTests/http/tests/security/cross-frame-access-get.html b/LayoutTests/http/tests/security/cross-frame-access-get.html |
index 8df12edb66caa5808c5eab64a4218026ab9eb7bd..31a7bd10c643f9f95345c0fe47c935b73007672d 100644 |
--- a/LayoutTests/http/tests/security/cross-frame-access-get.html |
+++ b/LayoutTests/http/tests/security/cross-frame-access-get.html |
@@ -223,25 +223,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() |