+ "<head>"
+ "<scr" + "ipt>"
+ "function fireSentinel() {"
- + "if (window.testRunner)"
- + "testRunner.globalFlag = true;"
+ + "window.top.postMessage(\"perform test\", \"*\");"
+ "}"
+ "</scr" + "ipt>"
+ "</head>"
+ "</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() {
</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>