Commit c7c47375 authored by dcheng@chromium.org's avatar dcheng@chromium.org

Deflake xss-DENIED-to-javascript-url-in-foreign-domain-subframe.html

This test was flaky because the iframe sent a postMessage to the parent
frame in its load handler. However, the parent frame may or may not have
run its load handler. If the parent frame's load handler hadn't run yet,
then there would be no handler for a postMessage. To prevent this race,
don't load the iframe until the parent frame is fully initialized.

BUG=409579

Review URL: https://codereview.chromium.org/713013005

git-svn-id: svn://svn.chromium.org/blink/trunk@185097 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 39649c68
...@@ -1233,7 +1233,6 @@ crbug.com/407915 virtual/implsidepainting/inspector/tracing/timeline-event-dispa ...@@ -1233,7 +1233,6 @@ crbug.com/407915 virtual/implsidepainting/inspector/tracing/timeline-event-dispa
crbug.com/409580 inspector/device-emulation/device-emulation-320-2x.html [ Crash Pass ] crbug.com/409580 inspector/device-emulation/device-emulation-320-2x.html [ Crash Pass ]
crbug.com/407993 [ Win ] media/encrypted-media/prefixed/encrypted-media-events.html [ Crash Pass ] crbug.com/407993 [ Win ] media/encrypted-media/prefixed/encrypted-media-events.html [ Crash Pass ]
crbug.com/409579 http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-subframe.html [ Pass Timeout ]
#crbug.com/409715 [ Win ] svg/W3C-SVG-1.1/text-intro-04-t.svg [ Crash Pass ] #crbug.com/409715 [ Win ] svg/W3C-SVG-1.1/text-intro-04-t.svg [ Crash Pass ]
crbug.com/409712 http/tests/filesystem/workers/resolve-url.html [ Pass Timeout ] crbug.com/409712 http/tests/filesystem/workers/resolve-url.html [ Pass Timeout ]
crbug.com/409767 crypto/worker-subtle-crypto-concurrent.html [ Crash Pass Timeout ] crbug.com/409767 crypto/worker-subtle-crypto-concurrent.html [ Crash Pass Timeout ]
......
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
if (window.testRunner) if (window.testRunner)
testRunner.notifyDone(); testRunner.notifyDone();
}); });
document.getElementById('testFrame').src="http://localhost:8000/security/javascriptURL/resources/foreign-domain-javascript-url-accessee-iframe.html"
} }
runTest = function() function runTest()
{ {
try { try {
window[0][0].document.getElementById('accessMe').innerHTML = "FAIL: Cross frame access to a javascript: URL embed in a frame on a foreign domain allowed."; window[0][0].document.getElementById('accessMe').innerHTML = "FAIL: Cross frame access to a javascript: URL embed in a frame on a foreign domain allowed.";
...@@ -35,7 +37,7 @@ ...@@ -35,7 +37,7 @@
<p>The scenario for this test is that you have an iframe with content from a foreign domain. In that foreign content <p>The scenario for this test is that you have an iframe with content from a foreign domain. In that foreign content
is an iframe which loads a javascript: URL. This tests that this main document does not have access to that is an iframe which loads a javascript: URL. This tests that this main document does not have access to that
javascript: URL loaded iframe.</p> javascript: URL loaded iframe.</p>
<iframe src="http://localhost:8000/security/javascriptURL/resources/foreign-domain-javascript-url-accessee-iframe.html" style="width: 400px; height:200px;"></iframe> <iframe id="testFrame" style="width: 400px; height:200px;"></iframe>
<pre id="console"></pre> <pre id="console"></pre>
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment