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

De-flake window.location shadowing layout tests.

Use onmessage instead of the iframe onload event, since the test itself
triggers navigation. Depending on the timing, the iframe onload handler
may run more than once.

BUG=381464

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

git-svn-id: svn://svn.chromium.org/blink/trunk@185142 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c64ad3a7
...@@ -1065,9 +1065,6 @@ crbug.com/247716 [ Mac XP ] editing/spelling/inline-spelling-markers-hidpi-compo ...@@ -1065,9 +1065,6 @@ crbug.com/247716 [ Mac XP ] editing/spelling/inline-spelling-markers-hidpi-compo
crbug.com/381730 http/tests/navigation/pending-location-change-assert.html [ Pass Failure ] crbug.com/381730 http/tests/navigation/pending-location-change-assert.html [ Pass Failure ]
crbug.com/381464 fast/dom/Window/Location/window-shadow-location-using-string.html [ Pass Failure ]
crbug.com/381464 fast/dom/Window/Location/window-shadow-location-using-js-object-with-toString.html [ Pass Failure ]
crbug.com/377476 fast/js/function-name.html [ NeedsManualRebaseline ] crbug.com/377476 fast/js/function-name.html [ NeedsManualRebaseline ]
crbug.com/377476 fast/js/getOwnPropertyDescriptor.html [ NeedsManualRebaseline ] crbug.com/377476 fast/js/getOwnPropertyDescriptor.html [ NeedsManualRebaseline ]
crbug.com/377476 fast/js/mozilla/strict/function-name-arity.html [ NeedsManualRebaseline ] crbug.com/377476 fast/js/mozilla/strict/function-name-arity.html [ NeedsManualRebaseline ]
......
<html> <html>
<body> <head>
<script>
function finishTest() {
window.parent.postMessage("done", "*");
}
</script>
</head>
<body onload="finishTest()">
<pre> <pre>
PASS PASS
</pre> </pre>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
testRunner.waitUntilDone(); testRunner.waitUntilDone();
var result; var result;
function frameLoaded() window.onmessage = function()
{ {
result = normalizeURL(String(window.frames[0].location)); result = normalizeURL(String(window.frames[0].location));
shouldBe("result", "'pass.html'"); shouldBe("result", "'pass.html'");
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
testRunner.notifyDone(); testRunner.notifyDone();
} }
</script> </script>
<iframe onload="frameLoaded()" src="resources/window-shadow-location-using-js-object-with-toString-iframe.html"></iframe> <iframe src="resources/window-shadow-location-using-js-object-with-toString-iframe.html"></iframe>
</body> </body>
</html> </html>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
testRunner.waitUntilDone(); testRunner.waitUntilDone();
var result; var result;
function frameLoaded() window.onmessage = function()
{ {
result = normalizeURL(String(window.frames[0].location)); result = normalizeURL(String(window.frames[0].location));
shouldBe("result", "'pass.html'"); shouldBe("result", "'pass.html'");
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
testRunner.notifyDone(); testRunner.notifyDone();
} }
</script> </script>
<iframe onload="frameLoaded()" src="resources/window-shadow-location-using-string-iframe.html"></iframe> <iframe src="resources/window-shadow-location-using-string-iframe.html"></iframe>
</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