Changeset 229726 in webkit


Ignore:
Timestamp:
Mar 19, 2018 4:12:19 PM (6 years ago)
Author:
Chris Dumez
Message:

Make policy decisions asynchronous
https://bugs.webkit.org/show_bug.cgi?id=180568
<rdar://problem/37131297>

Reviewed by Alex Christensen.

Source/WebKit:

Get rid of synchronous IPC and synchronous code paths for policy delegates.
Policy decisions are now all made asynchronously and rely on asynchronous
IPC.

This code change is based on work by Alex Christensen.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

LayoutTests:

Rebaseline tests for WebKit2. The issue is that some tests dump policy delegate calls
and things now happen in a slightly different order now that those delegates are
asynchronous.

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt:
  • platform/ios/http/tests/loading/simple-subframe-expected.txt:
  • platform/mac-wk2/http/tests/loading/simple-subframe-expected.txt: Copied from LayoutTests/platform/ios/http/tests/loading/simple-subframe-expected.txt.
  • platform/wk2/fast/loader/fragment-navigation-base-blank-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/fast/loader/iframe-meta-refresh-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/fast/loader/iframe-set-location-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/fast/loader/main-document-url-for-non-http-loads-expected.txt: Added.
  • platform/wk2/fast/loader/refresh-iframe-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/fast/loader/subframe-removes-itself-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled-expected.txt: Added.
  • platform/wk2/http/tests/contentextensions/block-everything-unless-domain-expected.txt: Added.
  • platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt:
  • platform/wk2/http/tests/loading/bad-server-subframe-expected.txt: Added.
  • platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt:
  • platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt: Added.
  • platform/wk2/http/tests/loading/slow-parsing-subframe-expected.txt: Added.
  • platform/wk2/http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt: Added.
  • platform/wk2/http/tests/misc/window-dot-stop-expected.txt: Added.
  • platform/wk2/http/tests/navigation/redirect-preserves-fragment-expected.txt: Added.
  • platform/wk2/http/tests/navigation/redirect-to-fragment-expected.txt: Added.
  • platform/wk2/http/tests/navigation/redirect-to-invalid-url-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-in-body-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-allow-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/blocked-on-redirect-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-enforced-and-report-policies-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-inherited-policy-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-xslt-document-in-iframe-with-inherited-policy-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-with-inherited-policy-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/http-0.9/iframe-blocked-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/about-blank-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/data-url-iframe-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/data-url-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/empty-url-plugin-in-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-css-with-secure-cookies-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-form-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/insecure-form-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-image-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/javascript-url-form-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-block-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/inspector/page/frameScheduledNavigation-expected.txt: Added.
  • platform/wk2/loader/go-back-cached-main-resource-expected.txt: Added.
  • platform/wk2/webarchive/loading/mainresource-null-mimetype-crash-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/webarchive/loading/test-loading-archive-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/webarchive/loading/video-in-webarchive-expected.txt: Renamed from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
Location:
trunk
Files:
73 added
12 edited
27 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r229722 r229726  
     12018-03-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Make policy decisions asynchronous
     4        https://bugs.webkit.org/show_bug.cgi?id=180568
     5        <rdar://problem/37131297>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Rebaseline tests for WebKit2. The issue is that some tests dump policy delegate calls
     10        and things now happen in a slightly different order now that those delegates are
     11        asynchronous.
     12
     13        * TestExpectations:
     14        * http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt:
     15        * platform/ios/http/tests/loading/simple-subframe-expected.txt:
     16        * platform/mac-wk2/http/tests/loading/simple-subframe-expected.txt: Copied from LayoutTests/platform/ios/http/tests/loading/simple-subframe-expected.txt.
     17        * platform/wk2/fast/loader/fragment-navigation-base-blank-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     18        * platform/wk2/fast/loader/iframe-meta-refresh-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
     19        * platform/wk2/fast/loader/iframe-set-location-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
     20        * platform/wk2/fast/loader/main-document-url-for-non-http-loads-expected.txt: Added.
     21        * platform/wk2/fast/loader/refresh-iframe-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
     22        * platform/wk2/fast/loader/subframe-removes-itself-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     23        * platform/wk2/http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled-expected.txt: Added.
     24        * platform/wk2/http/tests/contentextensions/block-everything-unless-domain-expected.txt: Added.
     25        * platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt:
     26        * platform/wk2/http/tests/loading/bad-server-subframe-expected.txt: Added.
     27        * platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt:
     28        * platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     29        * platform/wk2/http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt: Added.
     30        * platform/wk2/http/tests/loading/slow-parsing-subframe-expected.txt: Added.
     31        * platform/wk2/http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt: Added.
     32        * platform/wk2/http/tests/misc/window-dot-stop-expected.txt: Added.
     33        * platform/wk2/http/tests/navigation/redirect-preserves-fragment-expected.txt: Added.
     34        * platform/wk2/http/tests/navigation/redirect-to-fragment-expected.txt: Added.
     35        * platform/wk2/http/tests/navigation/redirect-to-invalid-url-expected.txt: Added.
     36        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt: Added.
     37        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt: Added.
     38        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-expected.txt: Added.
     39        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-in-body-expected.txt: Added.
     40        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-allow-expected.txt: Added.
     41        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-deny-expected.txt: Added.
     42        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt: Added.
     43        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt: Added.
     44        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt: Added.
     45        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt: Added.
     46        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow-expected.txt: Added.
     47        * platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt: Added.
     48        * platform/wk2/http/tests/security/blocked-on-redirect-expected.txt: Added.
     49        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     50        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-expected.txt: Added.
     51        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt: Added.
     52        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
     53        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-iframe-expected.txt: Added.
     54        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame-expected.txt: Added.
     55        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-expected.txt: Added.
     56        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-enforced-and-report-policies-expected.txt: Added.
     57        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-inherited-policy-expected.txt: Added.
     58        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt: Added.
     59        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
     60        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-xslt-document-in-iframe-with-inherited-policy-expected.txt: Added.
     61        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-iframe-expected.txt: Added.
     62        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
     63        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-expected.txt: Added.
     64        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-with-inherited-policy-expected.txt: Added.
     65        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
     66        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt: Added.
     67        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt: Added.
     68        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-iframe-expected.txt: Added.
     69        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-main-frame-expected.txt: Added.
     70        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     71        * platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     72        * platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added.
     73        * platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades-expected.txt: Added.
     74        * platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     75        * platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     76        * platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     77        * platform/wk2/http/tests/security/http-0.9/iframe-blocked-expected.txt: Added.
     78        * platform/wk2/http/tests/security/mixedContent/about-blank-iframe-in-main-frame-expected.txt: Added.
     79        * platform/wk2/http/tests/security/mixedContent/data-url-iframe-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     80        * platform/wk2/http/tests/security/mixedContent/data-url-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     81        * platform/wk2/http/tests/security/mixedContent/empty-url-plugin-in-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     82        * platform/wk2/http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     83        * platform/wk2/http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt: Added.
     84        * platform/wk2/http/tests/security/mixedContent/insecure-css-with-secure-cookies-expected.txt: Added.
     85        * platform/wk2/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt: Added.
     86        * platform/wk2/http/tests/security/mixedContent/insecure-form-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     87        * platform/wk2/http/tests/security/mixedContent/insecure-form-in-main-frame-expected.txt: Added.
     88        * platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-iframe-expected.txt: Added.
     89        * platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt: Added.
     90        * platform/wk2/http/tests/security/mixedContent/insecure-image-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     91        * platform/wk2/http/tests/security/mixedContent/javascript-url-form-in-main-frame-expected.txt: Added.
     92        * platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt: Added.
     93        * platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt: Added.
     94        * platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt: Added.
     95        * platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-block-expected.txt: Added.
     96        * platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-expected.txt: Added.
     97        * platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     98        * platform/wk2/http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     99        * platform/wk2/inspector/page/frameScheduledNavigation-expected.txt: Added.
     100        * platform/wk2/loader/go-back-cached-main-resource-expected.txt: Added.
     101        * platform/wk2/webarchive/loading/mainresource-null-mimetype-crash-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     102        * platform/wk2/webarchive/loading/test-loading-archive-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     103        * platform/wk2/webarchive/loading/video-in-webarchive-expected.txt: Renamed from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
     104
    11052018-03-19  Chris Dumez  <cdumez@apple.com>
    2106
  • trunk/LayoutTests/TestExpectations

    r229652 r229726  
    17201720webkit.org/b/183390 http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html [ DumpJSConsoleLogInStdErr Pass Failure ]
    17211721
     1722# We sometimes get 2 console log messages about CSP instead of 1 due to preloading.
     1723http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html [ DumpJSConsoleLogInStdErr ]
     1724
    17221725media/event-queue-crash.html [ DumpJSConsoleLogInStdErr ]
    17231726
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt

    r229617 r229726  
    44main frame - didFinishLoadForFrame
    55main frame - didCommitLoadForFrame
    6 CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/style.css because 'block-all-mixed-content' appears in the Content Security Policy.
    76main frame - didFinishDocumentLoadForFrame
    87main frame - didHandleOnloadEventsForFrame
  • trunk/LayoutTests/platform/ios/http/tests/loading/simple-subframe-expected.txt

    r229617 r229726  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didFinishDocumentLoadForFrame
    34frame "f1" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    55frame "f1" - didCommitLoadForFrame
    66frame "f1" - didFinishDocumentLoadForFrame
  • trunk/LayoutTests/platform/mac-wk2/http/tests/loading/simple-subframe-expected.txt

    r229725 r229726  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didFinishDocumentLoadForFrame
    34frame "f1" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    55frame "f1" - didCommitLoadForFrame
    66frame "f1" - didFinishDocumentLoadForFrame
     
    1414  RenderBlock {HTML} at (0,0) size 800x600
    1515    RenderBody {BODY} at (8,8) size 784x584
    16       RenderText {#text} at (0,0) size 496x19
     16      RenderText {#text} at (0,0) size 496x18
    1717        text run at (0,0) width 496: "This is a test of load callbacks. It is only useful inside the regression test tool."
    18       RenderBR {BR} at (495,15) size 1x0
    19       RenderPartObject {IFRAME} at (0,20) size 304x154 [border: (2px inset #000000)]
     18      RenderBR {BR} at (495,14) size 1x0
     19      RenderIFrame {IFRAME} at (0,18) size 304x154 [border: (2px inset #000000)]
    2020        layer at (0,0) size 300x150
    2121          RenderView at (0,0) size 300x150
     
    2323          RenderBlock {HTML} at (0,0) size 300x150
    2424            RenderBody {BODY} at (8,8) size 284x134
    25               RenderInline {B} at (0,0) size 24x19
    26                 RenderText {#text} at (0,0) size 24x19
     25              RenderInline {B} at (0,0) size 24x18
     26                RenderText {#text} at (0,0) size 24x18
    2727                  text run at (0,0) width 24: "test"
    2828      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/wk2/fast/loader/fragment-navigation-base-blank-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
     5main frame - didHandleOnloadEventsForFrame
     6frame "<!--framePath //<!--frame0-->-->" - didChangeLocationWithinPageForFrame
    87frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    98frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    109main frame - didFinishLoadForFrame
     10ALERT: Test finished due to hash change with a window count of 1
    1111
  • trunk/LayoutTests/platform/wk2/fast/loader/iframe-meta-refresh-base-blank-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
     1main frame - didFinishDocumentLoadForFrame
    32frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    5 frame "<!--framePath //<!--frame0-->-->" - didReceiveServerRedirectForProvisionalLoadForFrame
    6 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with httpUsername:httpPassword
    73frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    84frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    95frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    106main frame - didHandleOnloadEventsForFrame
     7frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: resources/notify-done-with-window-count.html
    118frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    129main frame - didFinishLoadForFrame
    13 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://localhost:8000/loading/authentication-after-redirect-stores-wrong-credentials/resources/wrong-credential-3-output-credentials-then-finish.php
    1410frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    1511frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
    1612frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
     13ALERT: Finishing test with a window count of 1
    1714frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    1815frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    1916frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    20 This test causes an HTTP authentication challenge in the middle of a redirect chain.
    21 It then loads a new page after that challenge, and the new page should *not* get any credentials passed to it.
    22 See bug 78003 for more details.
    2317
    24 
    25 
    26 --------
    27 Frame: '<!--framePath //<!--frame0-->-->'
    28 --------
    29 No HTTP authentication credentials
    30 
  • trunk/LayoutTests/platform/wk2/fast/loader/iframe-set-location-base-blank-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
     1main frame - didFinishDocumentLoadForFrame
    32frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    5 frame "<!--framePath //<!--frame0-->-->" - didReceiveServerRedirectForProvisionalLoadForFrame
    6 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with httpUsername:httpPassword
    73frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    84frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
     5frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: resources/notify-done-with-window-count.html
    96frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    107main frame - didHandleOnloadEventsForFrame
    118frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    129main frame - didFinishLoadForFrame
    13 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://localhost:8000/loading/authentication-after-redirect-stores-wrong-credentials/resources/wrong-credential-3-output-credentials-then-finish.php
    1410frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    1511frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
    1612frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
     13ALERT: Finishing test with a window count of 1
    1714frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    1815frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    1916frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    20 This test causes an HTTP authentication challenge in the middle of a redirect chain.
    21 It then loads a new page after that challenge, and the new page should *not* get any credentials passed to it.
    22 See bug 78003 for more details.
    2317
    24 
    25 
    26 --------
    27 Frame: '<!--framePath //<!--frame0-->-->'
    28 --------
    29 No HTTP authentication credentials
    30 
  • trunk/LayoutTests/platform/wk2/fast/loader/refresh-iframe-base-blank-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
     1main frame - didFinishDocumentLoadForFrame
    32frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    5 frame "<!--framePath //<!--frame0-->-->" - didReceiveServerRedirectForProvisionalLoadForFrame
    6 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with httpUsername:httpPassword
    73frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    84frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
     5frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: resources/refresh-iframe-base-blank-frame.html
    96frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    107main frame - didHandleOnloadEventsForFrame
    118frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    129main frame - didFinishLoadForFrame
    13 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://localhost:8000/loading/authentication-after-redirect-stores-wrong-credentials/resources/wrong-credential-3-output-credentials-then-finish.php
    1410frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    1511frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
    1612frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    1713frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
     14ALERT: Test finished with 1 windows
    1815frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    1916frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    20 This test causes an HTTP authentication challenge in the middle of a redirect chain.
    21 It then loads a new page after that challenge, and the new page should *not* get any credentials passed to it.
    22 See bug 78003 for more details.
    2317
    24 
    25 
    26 --------
    27 Frame: '<!--framePath //<!--frame0-->-->'
    28 --------
    29 No HTTP authentication credentials
    30 
  • trunk/LayoutTests/platform/wk2/fast/loader/subframe-removes-itself-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    8 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    9 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
     5frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
    106main frame - didFinishLoadForFrame
    11 
     7This tests a subframe that removes itself to make sure a delegate message to indicate the interrupted load fires.
  • trunk/LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt

    r229617 r229726  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didFinishDocumentLoadForFrame
    34frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    55frame "<!--framePath //<!--frame0-->-->" - didReceiveServerRedirectForProvisionalLoadForFrame
    66127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with httpUsername:httpPassword
  • trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt

    r229617 r229726  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didFinishDocumentLoadForFrame
    34frame "frame" - didStartProvisionalLoadForFrame
    4 main frame - didFinishDocumentLoadForFrame
    55127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with webkit:rocks
    66frame "frame" - didCommitLoadForFrame
  • trunk/LayoutTests/platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt

    r229725 r229726  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didReceiveTitle: Test for https://bugs.webkit.org/show_bug.cgi?id=29293
    34main frame - didFinishDocumentLoadForFrame
    45frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    66frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    77frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    88frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     9main frame - didHandleOnloadEventsForFrame
    910frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1011main frame - didFinishLoadForFrame
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame-expected.txt

    r229725 r229726  
     1main frame - didFinishDocumentLoadForFrame
     2main frame - didHandleOnloadEventsForFrame
     3main frame - didFinishLoadForFrame
    14main frame - didStartProvisionalLoadForFrame
    25main frame - didCommitLoadForFrame
    36main frame - didFinishDocumentLoadForFrame
    47frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    68frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    79frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    810frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     11main frame - didHandleOnloadEventsForFrame
    912frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1013main frame - didFinishLoadForFrame
     14This test opens a window and loads an insecure iframe using a data URL. We should *not* trigger a mixed content block because the data URL cannot be corrupted by an active network attacker.
    1115
     16PASS did load data URL iframe.
     17
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    21main frame - didFinishDocumentLoadForFrame
    32main frame - didHandleOnloadEventsForFrame
    43main frame - didFinishLoadForFrame
     4main frame - didStartProvisionalLoadForFrame
    55main frame - didCommitLoadForFrame
    6 CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/style.css because 'block-all-mixed-content' appears in the Content Security Policy.
    76main frame - didFinishDocumentLoadForFrame
    87main frame - didHandleOnloadEventsForFrame
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-main-frame-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    21main frame - didFinishDocumentLoadForFrame
    32main frame - didHandleOnloadEventsForFrame
    43main frame - didFinishLoadForFrame
     4main frame - didStartProvisionalLoadForFrame
    55main frame - didCommitLoadForFrame
    6 CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/style.css because 'block-all-mixed-content' appears in the Content Security Policy.
     6CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/resources/compass.jpg because 'block-all-mixed-content' appears in the Content Security Policy.
    77main frame - didFinishDocumentLoadForFrame
    88main frame - didHandleOnloadEventsForFrame
    99main frame - didFinishLoadForFrame
    10 This test opens a window and loads an insecure stylesheet. We should trigger a mixed content block because the main frame in the window has CSP directive block-all-mixed-content.
     10This test opens a window and loads an insecure image. We should trigger a mixed content block because the main frame in the window has CSP directive block-all-mixed-content.
    1111
    12 documentURI: https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-css.html
    13 referrer: http://127.0.0.1:8000/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
     12documentURI: https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-image.html
     13referrer: http://127.0.0.1:8000/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-main-frame.html
    1414blockedURI: http://127.0.0.1:8000
    1515violatedDirective: block-all-mixed-content
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-main-frame-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    21main frame - didFinishDocumentLoadForFrame
    32main frame - didHandleOnloadEventsForFrame
    43main frame - didFinishLoadForFrame
     4main frame - didStartProvisionalLoadForFrame
    55main frame - didCommitLoadForFrame
    6 CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/style.css because 'block-all-mixed-content' appears in the Content Security Policy.
    76main frame - didFinishDocumentLoadForFrame
    87main frame - didHandleOnloadEventsForFrame
    98main frame - didFinishLoadForFrame
    10 This test opens a window and loads an insecure stylesheet. We should trigger a mixed content block because the main frame in the window has CSP directive block-all-mixed-content.
     9CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/dummy.swf because 'block-all-mixed-content' appears in the Content Security Policy.
     10This test opens a window and loads an insecure plugin. We should trigger a mixed content block because the main frame in the window has CSP directive block-all-mixed-content.
    1111
    12 documentURI: https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-css.html
    13 referrer: http://127.0.0.1:8000/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
     12documentURI: https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-plugin.html
     13referrer: http://127.0.0.1:8000/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-main-frame.html
    1414blockedURI: http://127.0.0.1:8000
    1515violatedDirective: block-all-mixed-content
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-main-frame-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    21main frame - didFinishDocumentLoadForFrame
    32main frame - didHandleOnloadEventsForFrame
    43main frame - didFinishLoadForFrame
     4main frame - didStartProvisionalLoadForFrame
    55main frame - didCommitLoadForFrame
    6 CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/style.css because 'block-all-mixed-content' appears in the Content Security Policy.
     6CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/security/mixedContent/resources/script.js because 'block-all-mixed-content' appears in the Content Security Policy.
    77main frame - didFinishDocumentLoadForFrame
    88main frame - didHandleOnloadEventsForFrame
    99main frame - didFinishLoadForFrame
    10 This test opens a window and loads an insecure stylesheet. We should trigger a mixed content block because the main frame in the window has CSP directive block-all-mixed-content.
     10This test opens a window and loads an insecure external script. We should trigger a mixed content block because the main frame in the window has CSP directive block-all-mixed-content.
    1111
    12 documentURI: https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-css.html
    13 referrer: http://127.0.0.1:8000/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
     12documentURI: https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-script.html
     13referrer: http://127.0.0.1:8000/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-main-frame.html
    1414blockedURI: http://127.0.0.1:8000
    1515violatedDirective: block-all-mixed-content
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads an insecure image. We should *not* trigger a mixed content block even though the child frame has CSP directive block-all-mixed-content because the insecure image is upgraded to a secure image as the child frame has CSP directive upgrade-insecure-requests.
    1110
     11
     12
     13--------
     14Frame: '<!--framePath //<!--frame0-->-->'
     15--------
     16
     17PASS did load image.
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads an insecure image via a redirect. We should *not* trigger a mixed content block even though the child frame has CSP directive block-all-mixed-content because the redirected insecure image is upgraded to a secure image as the child frame has CSP directive upgrade-insecure-requests.
    1110
     11
     12
     13--------
     14Frame: '<!--framePath //<!--frame0-->-->'
     15--------
     16
     17PASS did load image.
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads an insecure style sheet. We should upgrade the CSS request to HTTPS, and thereby avoid triggering a mixed content callback.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads an insecure script (but with a tricky redirect). We should upgrade the script request, and thereby avoid triggering a mixed content callback.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads an insecure script (but with a tricky redirect). We should upgrade the relevant requests.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/data-url-iframe-in-main-frame-expected.txt

    r229725 r229726  
     1main frame - didFinishDocumentLoadForFrame
     2main frame - didHandleOnloadEventsForFrame
     3main frame - didFinishLoadForFrame
    14main frame - didStartProvisionalLoadForFrame
    25main frame - didCommitLoadForFrame
    36main frame - didFinishDocumentLoadForFrame
    47frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    68frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    79frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    810frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     11main frame - didHandleOnloadEventsForFrame
    912frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1013main frame - didFinishLoadForFrame
    11 
     14This test opens a window iframe that loads a data URL iframe. We should *not* trigger a mixed content callback because the data URL cannot be corrupted by active network attackers.
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/data-url-script-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads a data URL script. We should *not* trigger a mixed content callback because the data URL cannot be corrupted by an active network attacker.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/empty-url-plugin-in-frame-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads a plugin without a URL. We should *not* get a mixed content callback because the plug-in cannot be controlled by an active network attacker.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
     4CONSOLE MESSAGE: line 4: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-css.html was not allowed to run insecure content from http://127.0.0.1:8080/security/mixedContent/resources/style.css.
     5
    76frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    87frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     8main frame - didHandleOnloadEventsForFrame
    99frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1010main frame - didFinishLoadForFrame
     11This test loads a secure iframe that loads an insecure style sheet. We should trigger a mixed content callback because an active network attacker can use CSS3 to breach the confidentiality of the HTTPS security origin.
    1112
     13
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/insecure-form-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that has a form with an insecure action. We should *not* get a mixed content callback because the main frame is HTTP and the form doesn't contaminate the child iframe's security origin with mixed content.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/insecure-image-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    74frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    85frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6main frame - didHandleOnloadEventsForFrame
    97frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    108main frame - didFinishLoadForFrame
     9This test loads a secure iframe that loads an insecure image. We should *not* get a mixed content callback becase the main frame is HTTP and the image doesn't contaminate the child iframe's security origin with mixed content.
    1110
     11
  • trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
     4CONSOLE MESSAGE: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-redirect-https-to-http-script.html was not allowed to run insecure content from http://127.0.0.1:8080/security/mixedContent/resources/script.js.
     5
    76frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    87frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     8main frame - didHandleOnloadEventsForFrame
    99frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1010main frame - didFinishLoadForFrame
     11This test loads a secure iframe that loads an insecure script (but with a tricky redirect). We should trigger a mixed content callback because an active network attacker can end up controling the script.
    1112
     13
  • trunk/LayoutTests/platform/wk2/http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt

    r229725 r229726  
    1 main frame - didStartProvisionalLoadForFrame
    2 main frame - didCommitLoadForFrame
    31main frame - didFinishDocumentLoadForFrame
    42frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    63frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
     4CONSOLE MESSAGE: line 4: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/script-tag-with-callbacks.html&q=%3Cscript%3Ealert(String.fromCharCode(0x58,0x53,0x53))%3C/script%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
     5didDetectXSS
    76frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    87frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     8main frame - didHandleOnloadEventsForFrame
    99frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1010main frame - didFinishLoadForFrame
  • trunk/LayoutTests/platform/wk2/webarchive/loading/mainresource-null-mimetype-crash-expected.txt

    r229725 r229726  
    22main frame - didCommitLoadForFrame
    33main frame - didFinishDocumentLoadForFrame
     4main frame - didHandleOnloadEventsForFrame
    45frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    66frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    77frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
  • trunk/LayoutTests/platform/wk2/webarchive/loading/test-loading-archive-expected.txt

    r229725 r229726  
    22main frame - didCommitLoadForFrame
    33main frame - didFinishDocumentLoadForFrame
     4test-loading-archive.html - didFinishLoading
    45frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
     6resources/helloworld.webarchive - willSendRequest <NSURLRequest URL resources/helloworld.webarchive, main document URL test-loading-archive.html, http method GET> redirectResponse (null)
     7resources/helloworld.webarchive - didReceiveResponse <NSURLResponse resources/helloworld.webarchive, http status code 0>
    68frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    79frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    810frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     11main frame - didHandleOnloadEventsForFrame
    912frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
    1013main frame - didFinishLoadForFrame
    11 
     14 This tests that doing a "normal load" of a webarchive (not using loadArchive) does not cause a cancelled error to be called.
  • trunk/LayoutTests/platform/wk2/webarchive/loading/video-in-webarchive-expected.txt

    r229725 r229726  
    11main frame - didStartProvisionalLoadForFrame
     2main frame - didCommitLoadForFrame
     3main frame - willPerformClientRedirectToURL: resources/video-in-webarchive.webarchive
     4main frame - didFinishDocumentLoadForFrame
     5main frame - didFinishLoadForFrame
     6main frame - didStartProvisionalLoadForFrame
     7main frame - didCancelClientRedirectForFrame
    28main frame - didCommitLoadForFrame
    39main frame - didFinishDocumentLoadForFrame
    410frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    5 main frame - didHandleOnloadEventsForFrame
    611frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    712frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    813frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    9 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
     14main frame - didHandleOnloadEventsForFrame
     15frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
    1016main frame - didFinishLoadForFrame
    1117
  • trunk/Source/WebKit/ChangeLog

    r229715 r229726  
     12018-03-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Make policy decisions asynchronous
     4        https://bugs.webkit.org/show_bug.cgi?id=180568
     5        <rdar://problem/37131297>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Get rid of synchronous IPC and synchronous code paths for policy delegates.
     10        Policy decisions are now all made asynchronously and rely on asynchronous
     11        IPC.
     12
     13        This code change is based on work by Alex Christensen.
     14
     15        * UIProcess/WebPageProxy.cpp:
     16        (WebKit::WebPageProxy::receivedPolicyDecision):
     17        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
     18        (WebKit::WebPageProxy::decidePolicyForResponse):
     19        * UIProcess/WebPageProxy.h:
     20        * UIProcess/WebPageProxy.messages.in:
     21        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     22        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
     23        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
     24
    1252018-03-19  Brian Burg  <bburg@apple.com>
    226
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r229643 r229726  
    23362336    if (action == PolicyAction::Download) {
    23372337        // Create a download proxy.
    2338         const ResourceRequest& downloadRequest = m_decidePolicyForResponseRequest ? *m_decidePolicyForResponseRequest : ResourceRequest();
    2339         DownloadProxy* download = m_process->processPool().createDownloadProxy(downloadRequest, this);
     2338        auto* download = m_process->processPool().createDownloadProxy(m_decidePolicyForResponseRequest, this);
    23402339        if (navigation) {
    23412340            download->setWasUserInitiated(navigation->wasUserInitiated());
     
    23452344        downloadID = download->downloadID();
    23462345        handleDownloadRequest(download);
    2347     }
    2348 
    2349     // If we received a policy decision while in decidePolicyForResponse the decision will
    2350     // be sent back to the web process by decidePolicyForResponse.
    2351     if (m_inDecidePolicyForResponseSync) {
    2352         m_syncMimeTypePolicyActionIsValid = true;
    2353         m_syncMimeTypePolicyAction = action;
    2354         m_syncMimeTypePolicyDownloadID = downloadID;
    2355         return;
    2356     }
    2357 
    2358     // If we received a policy decision while in decidePolicyForNavigationAction the decision will
    2359     // be sent back to the web process by decidePolicyForNavigationAction.
    2360     if (m_inDecidePolicyForNavigationAction) {
    2361         m_syncNavigationActionPolicyActionIsValid = true;
    2362         m_syncNavigationActionPolicyAction = action;
    2363         m_syncNavigationActionPolicyDownloadID = downloadID;
    2364         m_syncNavigationActionPolicyWebsitePolicies = WTFMove(websitePolicies);
    2365         return;
    2366     }
    2367    
     2346        m_decidePolicyForResponseRequest = { };
     2347    }
     2348
    23682349    m_process->send(Messages::WebPage::DidReceivePolicyDecision(frame.frameID(), listenerID, action, navigation ? navigation->navigationID() : 0, downloadID, websitePolicies), m_pageID);
    23692350}
     
    37673748}
    37683749
    3769 void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, NavigationActionData&& navigationActionData, const FrameInfoData& originatingFrameInfoData, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, ResourceRequest&& request, uint64_t listenerID, const UserData& userData, bool& receivedPolicyAction, uint64_t& newNavigationID, WebCore::PolicyAction& policyAction, DownloadID& downloadID, std::optional<WebsitePoliciesData>& websitePolicies)
     3750void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, NavigationActionData&& navigationActionData, const FrameInfoData& originatingFrameInfoData, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, ResourceRequest&& request, uint64_t listenerID, const UserData& userData)
    37703751{
    37713752    PageClientProtector protector(m_pageClient);
     
    37823763    MESSAGE_CHECK_URL(originalRequest.url());
    37833764   
     3765    uint64_t newNavigationID { 0 };
    37843766    Ref<WebFramePolicyListenerProxy> listener = frame->setUpPolicyListenerProxy(listenerID);
    37853767    if (!navigationID) {
     
    37913773    } else {
    37923774        auto& navigation = m_navigationState->navigation(navigationID);
     3775        newNavigationID = navigationID;
    37933776        navigation.setWasUserInitiated(!!navigationActionData.userGestureTokenIdentifier);
    37943777        navigation.setShouldForceDownload(!navigationActionData.downloadAttribute.isNull());
     
    37973780
    37983781#if ENABLE(CONTENT_FILTERING)
    3799     if (frame->didHandleContentFilterUnblockNavigation(request)) {
    3800         receivedPolicyAction = true;
    3801         policyAction = PolicyAction::Ignore;
    3802         return;
    3803     }
    3804 #endif
    3805 
    3806     ASSERT(!m_inDecidePolicyForNavigationAction);
    3807    
    3808     m_inDecidePolicyForNavigationAction = true;
    3809     m_syncNavigationActionPolicyActionIsValid = false;
     3782    if (frame->didHandleContentFilterUnblockNavigation(request))
     3783        return receivedPolicyDecision(PolicyAction::Ignore, *frame, listenerID, &m_navigationState->navigation(newNavigationID), { });
     3784#endif
    38103785
    38113786    WebFrameProxy* originatingFrame = m_process->webFrame(originatingFrameInfoData.frameID);
     
    38293804
    38303805    m_shouldSuppressAppLinksInNextNavigationPolicyDecision = false;
    3831     m_inDecidePolicyForNavigationAction = false;
    3832 
    3833     // Check if we received a policy decision already. If we did, we can just pass it back.
    3834     receivedPolicyAction = m_syncNavigationActionPolicyActionIsValid;
    3835     if (m_syncNavigationActionPolicyActionIsValid) {
    3836         policyAction = m_syncNavigationActionPolicyAction;
    3837         downloadID = m_syncNavigationActionPolicyDownloadID;
    3838         websitePolicies = WTFMove(m_syncNavigationActionPolicyWebsitePolicies);
    3839     }
    38403806}
    38413807
     
    38683834{
    38693835    PageClientProtector protector(m_pageClient);
     3836
     3837    m_decidePolicyForResponseRequest = request;
    38703838
    38713839    WebFrameProxy* frame = m_process->webFrame(frameID);
     
    38833851    } else
    38843852        m_policyClient->decidePolicyForResponse(*this, *frame, response, request, canShowMIMEType, WTFMove(listener), m_process->transformHandlesToObjects(userData.object()).get());
    3885 }
    3886 
    3887 void WebPageProxy::decidePolicyForResponseSync(uint64_t frameID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const ResourceResponse& response, const ResourceRequest& request, bool canShowMIMEType, uint64_t listenerID, const UserData& userData, bool& receivedPolicyAction, WebCore::PolicyAction& policyAction, DownloadID& downloadID)
    3888 {
    3889     PageClientProtector protector(m_pageClient);
    3890 
    3891     ASSERT(!m_inDecidePolicyForResponseSync);
    3892 
    3893     m_inDecidePolicyForResponseSync = true;
    3894     m_decidePolicyForResponseRequest = &request;
    3895     m_syncMimeTypePolicyActionIsValid = false;
    3896    
    3897     decidePolicyForResponse(frameID, frameSecurityOrigin, navigationID, response, request, canShowMIMEType, listenerID, userData);
    3898    
    3899     m_inDecidePolicyForResponseSync = false;
    3900     m_decidePolicyForResponseRequest = nullptr;
    3901    
    3902     // Check if we received a policy decision already. If we did, we can just pass it back.
    3903     receivedPolicyAction = m_syncMimeTypePolicyActionIsValid;
    3904     if (m_syncMimeTypePolicyActionIsValid) {
    3905         policyAction = m_syncMimeTypePolicyAction;
    3906         downloadID = m_syncMimeTypePolicyDownloadID;
    3907     }
    39083853}
    39093854
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r229707 r229726  
    13681368    void didDestroyNavigation(uint64_t navigationID);
    13691369
    1370     void decidePolicyForNavigationAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, NavigationActionData&&, const FrameInfoData&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, uint64_t& newNavigationID, WebCore::PolicyAction&, DownloadID&, std::optional<WebsitePoliciesData>&);
     1370    void decidePolicyForNavigationAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, NavigationActionData&&, const FrameInfoData&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, uint64_t listenerID, const UserData&);
    13711371    void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, NavigationActionData&&, WebCore::ResourceRequest&&, const String& frameName, uint64_t listenerID, const UserData&);
    13721372    void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&);
    1373     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, WebCore::PolicyAction&, DownloadID&);
    13741373    void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&);
    13751374
     
    19191918    bool m_isPerformingDOMPrintOperation { false };
    19201919
    1921     bool m_inDecidePolicyForResponseSync { false };
    1922     const WebCore::ResourceRequest* m_decidePolicyForResponseRequest { nullptr };
    1923     bool m_syncMimeTypePolicyActionIsValid { false };
    1924     WebCore::PolicyAction m_syncMimeTypePolicyAction { WebCore::PolicyAction::Use };
    1925     DownloadID m_syncMimeTypePolicyDownloadID { 0 };
    1926     bool m_inDecidePolicyForNavigationAction { false };
    1927     bool m_syncNavigationActionPolicyActionIsValid { false };
    1928     WebCore::PolicyAction m_syncNavigationActionPolicyAction { WebCore::PolicyAction::Use };
    1929     DownloadID m_syncNavigationActionPolicyDownloadID { 0 };
    1930     std::optional<WebsitePoliciesData> m_syncNavigationActionPolicyWebsitePolicies;
    1931 
     1920    WebCore::ResourceRequest m_decidePolicyForResponseRequest;
    19321921    bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
    19331922
  • trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r229707 r229726  
    9999
    100100    # Policy messages
    101     DecidePolicyForResponseSync(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, uint64_t listenerID, WebKit::UserData userData) -> (bool receivedPolicyAction, enum WebCore::PolicyAction policyAction, WebKit::DownloadID downloadID)
    102     DecidePolicyForNavigationAction(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, uint64_t originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::UserData userData) -> (bool receivedPolicyAction, uint64_t newNavigationID, enum WebCore::PolicyAction policyAction, WebKit::DownloadID downloadID, std::optional<WebKit::WebsitePoliciesData> websitePolicies)
     101    DecidePolicyForResponse(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, uint64_t listenerID, WebKit::UserData userData)
     102    DecidePolicyForNavigationAction(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, uint64_t originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::UserData userData)
    103103    DecidePolicyForNewWindowAction(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebKit::NavigationActionData navigationActionData, WebCore::ResourceRequest request, String frameName, uint64_t listenerID, WebKit::UserData userData)
    104104    UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::UserData userData)
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r229683 r229726  
    749749    Ref<WebFrame> protector(*m_frame);
    750750    uint64_t listenerID = m_frame->setUpPolicyListener(WTFMove(function), WebFrame::ForNavigationAction::No);
    751     bool receivedPolicyAction;
    752     PolicyAction policyAction;
    753     DownloadID downloadID;
    754 
    755751    auto navigationID = static_cast<WebDocumentLoader&>(*policyDocumentLoader).navigationID();
    756     if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame->frameID(), SecurityOriginData::fromFrame(coreFrame), navigationID, response, request, canShowMIMEType, listenerID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID), Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend)) {
     752    if (!webPage->send(Messages::WebPageProxy::DecidePolicyForResponse(m_frame->frameID(), SecurityOriginData::fromFrame(coreFrame), navigationID, response, request, canShowMIMEType, listenerID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get()))))
    757753        m_frame->didReceivePolicyDecision(listenerID, PolicyAction::Ignore, 0, { }, { });
    758         return;
    759     }
    760 
    761     // We call this synchronously because CFNetwork can only convert a loading connection to a download from its didReceiveResponse callback.
    762     if (receivedPolicyAction)
    763         m_frame->didReceivePolicyDecision(listenerID, policyAction, 0, downloadID, { });
    764754}
    765755
     
    844834   
    845835    uint64_t listenerID = m_frame->setUpPolicyListener(WTFMove(function), WebFrame::ForNavigationAction::Yes);
    846     bool receivedPolicyAction;
    847     uint64_t newNavigationID;
    848     PolicyAction policyAction;
    849     DownloadID downloadID;
    850836
    851837    ASSERT(navigationAction.sourceDocument());
     
    886872    // Notify the UIProcess.
    887873    Ref<WebFrame> protect(*m_frame);
    888     std::optional<WebsitePoliciesData> websitePolicies;
    889     if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForNavigationAction(m_frame->frameID(), SecurityOriginData::fromFrame(coreFrame), documentLoader->navigationID(), navigationActionData, originatingFrameInfoData, originatingFrame && originatingFrame->page() ? originatingFrame->page()->pageID() : 0, navigationAction.resourceRequest(), request, listenerID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())), Messages::WebPageProxy::DecidePolicyForNavigationAction::Reply(receivedPolicyAction, newNavigationID, policyAction, downloadID, websitePolicies))) {
     874    if (!webPage->send(Messages::WebPageProxy::DecidePolicyForNavigationAction(m_frame->frameID(), SecurityOriginData::fromFrame(coreFrame), documentLoader->navigationID(), navigationActionData, originatingFrameInfoData, originatingFrame && originatingFrame->page() ? originatingFrame->page()->pageID() : 0, navigationAction.resourceRequest(), request, listenerID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get()))))
    890875        m_frame->didReceivePolicyDecision(listenerID, PolicyAction::Ignore, 0, { }, { });
    891         return;
    892     }
    893 
    894     // We call this synchronously because WebCore cannot gracefully handle a frame load without a synchronous navigation policy reply.
    895     if (receivedPolicyAction)
    896         m_frame->didReceivePolicyDecision(listenerID, policyAction, newNavigationID, downloadID, WTFMove(websitePolicies));
    897876}
    898877
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm

    r225553 r229726  
    117117        isDone = false;
    118118        TestWebKitAPI::Util::run(&isDone);
    119         // In success, we should only start 3 provisional loads: 2 for the loadRequest, and *only 1* for the _loadAlternateHTMLString.
    120         EXPECT_EQ(3, provisionalLoadCount);
     119        // In success, we should only start 2 provisional loads: 1 for the second loadRequest, and 1 for the _loadAlternateHTMLString.
     120        // The second loadRequest cancels the first one before its provisional load starts.
     121        EXPECT_EQ(2, provisionalLoadCount);
    121122    }
    122123}
Note: See TracChangeset for help on using the changeset viewer.