LayoutTests/ChangeLog

 12018-03-05 Chris Dumez <cdumez@apple.com>
 2
 3 fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
 4 https://bugs.webkit.org/show_bug.cgi?id=183337
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Add layout test coverage.
 9
 10 * fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt: Added.
 11 * fast/loader/onload-policy-ignore-for-frame-async-delegates.html: Added.
 12
1132018-03-05 Ali Juma <ajuma@chromium.org>
214
315 imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html times out with async policy delegates

LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt

 1Test for window.onload never fires if page contains an <iframe> with a bad scheme or whose load is cancelled by returning null from resource load delegate's willSendRequest. If the test passes, you should see the word "PASSED" below.
 2
 3PASSED
 4

LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4 <title>Test for Bug 33533: window.onload never fires if page contains an &lt;iframe> with a bad scheme or whose load is cancelled by returning null from resource load delegate's willSendRequest</title>
 5 <script>
 6 if (window.testRunner) {
 7 testRunner.dumpAsText();
 8 testRunner.setCustomPolicyDelegate(true);
 9 if (testRunner.setShouldDecideNavigationPolicyAfterDelay)
 10 testRunner.setShouldDecideNavigationPolicyAfterDelay(true);
 11 }
 12
 13 window.onload = function() {
 14 var result = document.getElementById("result");
 15 if (!window.testRunner) {
 16 result.innerText = "This test can only be run in DumpRenderTree.";
 17 return;
 18 }
 19 result.innerText = "PASSED";
 20 };
 21 </script>
 22</head>
 23<body>
 24 <p>Test for <a href="http://webkit.org/b/33533">window.onload never fires if page contains an
 25 &lt;iframe> with a bad scheme or whose load is cancelled by returning null from resource load
 26 delegate's willSendRequest</a>. If the test passes, you should see the word "PASSED" below.</p>
 27 <div id=result>FAILED</div>
 28 <iframe src="http://www.example.com/"></iframe>
 29</body>
 30</html>

Source/WebCore/ChangeLog

 12018-03-05 Chris Dumez <cdumez@apple.com>
 2
 3 fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
 4 https://bugs.webkit.org/show_bug.cgi?id=183337
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Make sure we call checkCompleted() before calling checkLoadComplete() in
 9 FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
 10 to ignore the navigation, so that we properly recognize that the load is
 11 done. This matches what is already done in FrameLoader::receivedMainResourceError().
 12
 13 Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html
 14
 15 * loader/FrameLoader.cpp:
 16 (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
 17
1182018-03-05 Ali Juma <ajuma@chromium.org>
219
320 imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html times out with async policy delegates

Source/WebCore/loader/FrameLoader.cpp

@@void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest& reque
31593159 clientRedirectCancelledOrFinished(false);
31603160
31613161 setPolicyDocumentLoader(nullptr);
 3162 checkCompleted();
31623163 checkLoadComplete();
31633164
31643165 // If the navigation request came from the back/forward menu, and we punt on it, we have the