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

Unified Diff: LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-window-stop.html

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 8 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/fast/events/resources/subframe-stop-load-in-unload-handler-using-window-stop.html
diff --git a/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-window-stop.html b/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-window-stop.html
index c0d9682e675a13d10b43b2a5fb8d6a471da9a38c..8c34837c4bbbf7bdd3361e40177471364649af67 100644
--- a/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-window-stop.html
+++ b/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-window-stop.html
@@ -1,5 +1,12 @@
<script>
- window.location = "pass.html";
+ // We need to wait until the iframe has finished loading before navigating or
+ // we risk getting duplicate prints from WebTestProxyBase::DidFinishDocumentLoad
+ // due to a race between the FrameLoader::startLoad due to setting window.location
+ // and Document::finishedParsing both of which call FrameLoader::finishedParsing
+ // which in turn calls. WebTestProxyBase::DidFinishDocumentLoad.
+ window.onload = function() {
+ window.location = "pass.html";
+ }
window.onunload = function()
{

Powered by Google App Engine
This is Rietveld 408576698