Title: [229304] trunk
- Revision
- 229304
- Author
- [email protected]
- Date
- 2018-03-05 19:13:32 -0800 (Mon, 05 Mar 2018)
Log Message
fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183337
Reviewed by Ryosuke Niwa.
Source/WebCore:
Make sure we call checkCompleted() before calling checkLoadComplete() in
FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
to ignore the navigation, so that we properly recognize that the load is
done. This matches what is already done in FrameLoader::receivedMainResourceError().
Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
LayoutTests:
Add layout test coverage.
* fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt: Added.
* fast/loader/onload-policy-ignore-for-frame-async-delegates.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (229303 => 229304)
--- trunk/LayoutTests/ChangeLog 2018-03-06 03:06:06 UTC (rev 229303)
+++ trunk/LayoutTests/ChangeLog 2018-03-06 03:13:32 UTC (rev 229304)
@@ -1,3 +1,15 @@
+2018-03-05 Chris Dumez <[email protected]>
+
+ fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
+ https://bugs.webkit.org/show_bug.cgi?id=183337
+
+ Reviewed by Ryosuke Niwa.
+
+ Add layout test coverage.
+
+ * fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt: Added.
+ * fast/loader/onload-policy-ignore-for-frame-async-delegates.html: Added.
+
2018-03-05 Andy Estes <[email protected]>
[Mac] Teach WebCore::Pasteboard about file promise drags
Added: trunk/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt (0 => 229304)
--- trunk/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt 2018-03-06 03:13:32 UTC (rev 229304)
@@ -0,0 +1,5 @@
+Policy delegate: attempt to load http://www.example.com/ with navigation type 'other'
+Test 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.
+
+PASSED
+
Added: trunk/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates.html (0 => 229304)
--- trunk/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates.html (rev 0)
+++ trunk/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates.html 2018-03-06 03:13:32 UTC (rev 229304)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Test for Bug 33533: 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</title>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.setCustomPolicyDelegate(true);
+ if (testRunner.setShouldDecideNavigationPolicyAfterDelay)
+ testRunner.setShouldDecideNavigationPolicyAfterDelay(true);
+ }
+
+ window._onload_ = function() {
+ var result = document.getElementById("result");
+ if (!window.testRunner) {
+ result.innerText = "This test can only be run in DumpRenderTree.";
+ return;
+ }
+ result.innerText = "PASSED";
+ };
+ </script>
+</head>
+<body>
+ <p>Test for <a href="" 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</a>. If the test passes, you should see the word "PASSED" below.</p>
+ <div id=result>FAILED</div>
+ <iframe src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (229303 => 229304)
--- trunk/Source/WebCore/ChangeLog 2018-03-06 03:06:06 UTC (rev 229303)
+++ trunk/Source/WebCore/ChangeLog 2018-03-06 03:13:32 UTC (rev 229304)
@@ -1,3 +1,20 @@
+2018-03-05 Chris Dumez <[email protected]>
+
+ fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
+ https://bugs.webkit.org/show_bug.cgi?id=183337
+
+ Reviewed by Ryosuke Niwa.
+
+ Make sure we call checkCompleted() before calling checkLoadComplete() in
+ FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
+ to ignore the navigation, so that we properly recognize that the load is
+ done. This matches what is already done in FrameLoader::receivedMainResourceError().
+
+ Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+
2018-03-05 Myles C. Maxfield <[email protected]>
[Cocoa] Allow user-installed fonts to be disabled
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (229303 => 229304)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2018-03-06 03:06:06 UTC (rev 229303)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2018-03-06 03:13:32 UTC (rev 229304)
@@ -3159,6 +3159,7 @@
clientRedirectCancelledOrFinished(false);
setPolicyDocumentLoader(nullptr);
+ checkCompleted();
checkLoadComplete();
// If the navigation request came from the back/forward menu, and we punt on it, we have the
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (229303 => 229304)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp 2018-03-06 03:06:06 UTC (rev 229303)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp 2018-03-06 03:13:32 UTC (rev 229304)
@@ -1321,9 +1321,6 @@
injectedBundle.outputText(stringBuilder.toString());
}
- if (injectedBundle.testRunner()->shouldDecideNavigationPolicyAfterDelay())
- return WKBundlePagePolicyActionPassThrough;
-
if (!injectedBundle.testRunner()->isPolicyDelegateEnabled()) {
WKRetainPtr<WKStringRef> downloadAttributeRef(AdoptWK, WKBundleNavigationActionCopyDownloadAttribute(navigationAction));
String downloadAttribute = toWTFString(downloadAttributeRef);
@@ -1353,6 +1350,10 @@
stringBuilder.append('\n');
injectedBundle.outputText(stringBuilder.toString());
+
+ if (injectedBundle.testRunner()->shouldDecideNavigationPolicyAfterDelay())
+ return WKBundlePagePolicyActionPassThrough;
+
injectedBundle.testRunner()->notifyDone();
if (injectedBundle.testRunner()->isPolicyDelegatePermissive())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes