Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html

Issue 494343003: Eliminate globalFlag usage from http security layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistify Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html
diff --git a/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html b/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html
index 6c9e975aebe3c7053bb17a4191c40c1136a68f9c..ded14067c2ef1acaf2650c9598fc11dd63822422 100644
--- a/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html
+++ b/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html
@@ -15,8 +15,7 @@
+ "<head>"
+ "<scr" + "ipt>"
+ "function fireSentinel() {"
- + "if (window.testRunner)"
- + "testRunner.globalFlag = true;"
+ + "window.opener.postMessage('done', '*');"
+ "}"
+ "</scr" + "ipt>"
+ "</head>"
@@ -26,20 +25,8 @@
+ "</body>"
+ "</html>";
+ window.addEventListener('message', performTest);
openedWindow = window.open(url);
-
- if (window.testRunner) {
- setTimeout(waitForFlag, 1);
- function waitForFlag() {
- if (!testRunner.globalFlag) {
- setTimeout(waitForFlag, 1);
- return;
- }
- performTest();
- }
- } else {
- log("Click the button when all the subframes have finished loading.");
- }
}
function performTest() {
@@ -55,7 +42,6 @@
</head>
<body onload="loaded();">
<p>Opener Frame</p>
- <button onclick="performTest()">Test</button>
<pre id="console"></pre>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698