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() |
{ |