Index: third_party/WebKit/LayoutTests/http/tests/loading/redirect-methods.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/redirect-methods.html b/third_party/WebKit/LayoutTests/http/tests/loading/redirect-methods.html |
index 55e2cdbbc939b76a0397e3f8817143f2246a3d08..39abd27fad51a52d246bf5e6dd51b07804fb8bcf 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/loading/redirect-methods.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/redirect-methods.html |
@@ -33,8 +33,14 @@ function iframeLoaded(frameID) |
var iframe = document.getElementById(frameID); |
if (iframe.hasAttribute("submitted")) { |
if (++frameID == testCodes.length) { |
- if (window.testRunner) |
- testRunner.notifyDone(); |
+ if (window.testRunner) { |
+ // Before finishing the test, we have to allow the callstack to |
+ // unwind - this enables dumping of pending WebFrameClient |
+ // callbacks (i.e. didFinishLoad and/or didHandleOnloadEvents). |
+ window.setTimeout(function() { |
+ testRunner.notifyDone(); |
+ }, 0); |
+ } |
return; |
} |
createFrame(frameID); |