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

Unified Diff: LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.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-sub-frame-2-level.html
diff --git a/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html b/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html
index f88bd7842532185a227606bd341cd17a06b9cbc4..9c19ebdb7acb0ed974e66e9840b0042305abc74e 100644
--- a/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html
+++ b/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html
@@ -13,8 +13,7 @@
+ "<head>"
+ "<scr" + "ipt>"
+ "function fireSentinel() {"
- + "if (window.testRunner)"
- + "testRunner.globalFlag = true;"
+ + "window.top.postMessage(\"perform test\", \"*\");"
+ "}"
+ "</scr" + "ipt>"
+ "</head>"
@@ -31,21 +30,9 @@
+ "</body>"
+ "</html>";
+ window.addEventListener('message', performTest);
var iframe = document.getElementById("aFrame");
iframe.src = 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() {
@@ -70,7 +57,6 @@
</head>
<body onload="loaded();">
<p>This tests that the main frame doesn't have access to a data: URL loaded in an iframe inside another data: URL loaded iframe.</p>
- <button onclick="performTest()">Test</button>
<iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></iframe>
<pre id='console'></pre>
</body>

Powered by Google App Engine
This is Rietveld 408576698