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

Unified Diff: LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-document-write.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-document-write.html
diff --git a/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-document-write.html b/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-document-write.html
index f8664cf27d28a69d2b7b13ca2263a21d96f811e5..b0f1948a12406805fe455ca940e30936fa14608c 100644
--- a/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-document-write.html
+++ b/LayoutTests/fast/events/resources/subframe-stop-load-in-unload-handler-using-document-write.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