Index: third_party/WebKit/LayoutTests/fast/parser/close-while-stopping.html |
diff --git a/third_party/WebKit/LayoutTests/fast/parser/close-while-stopping.html b/third_party/WebKit/LayoutTests/fast/parser/close-while-stopping.html |
index 1239e922c0b6401303206790ec9d3ac6d0f772d1..a676b9b92133deb2293ab6e1eb293c5a2fd7a5d8 100644 |
--- a/third_party/WebKit/LayoutTests/fast/parser/close-while-stopping.html |
+++ b/third_party/WebKit/LayoutTests/fast/parser/close-while-stopping.html |
@@ -7,6 +7,7 @@ |
<iframe id="aframe"></iframe> |
<script> |
description("Test that explicitly closing the document while it is already closing doesn't result in running the end twice."); |
+jsTestIsAsync = true; |
var frameDocument = document.getElementById("aframe").contentDocument; |
frameDocument.open(); |
@@ -14,6 +15,9 @@ frameDocument.onreadystatechange = function() |
{ |
debug(frameDocument.readyState); |
frameDocument.close(); |
+ if (frameDocument.readyState === 'complete') { |
+ setTimeout(finishJSTest, 100); |
+ } |
}; |
frameDocument.write("<script>document.close()</scr"+"ipt>"); |
</script> |