Index: LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html |
diff --git a/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html b/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html |
index dd8e320c3f3e849c6722b5a9b1fe81cb8b799d9e..03914ce3e57b829a3cc77d1d855fef87cd9e17e7 100644 |
--- a/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html |
+++ b/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html |
@@ -12,27 +12,12 @@ |
testRunner.setCanOpenWindows(); |
} |
+ window.addEventListener('message', function () |
+ { |
+ runTest(); |
+ closeWindowAndNotifyDone(openedWindow); |
+ }); |
openedWindow = window.open("http://localhost:8000/security/dataURL/resources/foreign-domain-data-url-accessee-opened-frame.html"); |
- |
- 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(); |
- closeWindowAndNotifyDone(openedWindow); |
} |
runTest = function() |