Index: LayoutTests/http/tests/security/cross-frame-access-enumeration.html |
diff --git a/LayoutTests/http/tests/security/cross-frame-access-enumeration.html b/LayoutTests/http/tests/security/cross-frame-access-enumeration.html |
index f43cf97dfbfe22e0e3c77309fdbec35a25698c5b..30632aba76d9ac3425cb851460cd0e7f2259a15d 100644 |
--- a/LayoutTests/http/tests/security/cross-frame-access-enumeration.html |
+++ b/LayoutTests/http/tests/security/cross-frame-access-enumeration.html |
@@ -9,27 +9,14 @@ |
testRunner.waitUntilDone(); |
} |
- if (window.testRunner) { |
- setTimeout(pollForTest, 1); |
- } else { |
- log("To run the test, click the button below when the frame finishes loading."); |
- var button = document.createElement("button"); |
- button.appendChild(document.createTextNode("Run Test")); |
- button.onclick = runTest; |
- document.body.appendChild(button); |
- } |
+ window.addEventListener('message', function () |
+ { |
+ runTest(); |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ }); |
} |
- pollForTest = function() |
- { |
- if (!testRunner.globalFlag) { |
- setTimeout(pollForTest, 1); |
- return; |
- } |
- runTest(); |
- testRunner.notifyDone(); |
- } |
- |
runTest = function() |
{ |
// Test enumerating the Window object |