WebKit Bugzilla
Attachment 338766 Details for
Bug 184962
: PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Made data: and about: use same process
bug-184962-20180425115834.patch (text/plain), 21.44 KB, created by
Ryosuke Niwa
on 2018-04-25 11:58:35 PDT
(
hide
)
Description:
Made data: and about: use same process
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2018-04-25 11:58:35 PDT
Size:
21.44 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 230983) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2018-04-25 Ryosuke Niwa <rniwa@webkit.org> >+ >+ PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank >+ https://bugs.webkit.org/show_bug.cgi?id=184962 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added NavigationAction::treatAsSameOriginNavigation, which signifies WebKit code >+ to avoid creating a new WebContent process when navigating to a blob object URL. >+ >+ Tests: ProcessSwap.SameOriginBlobNavigation >+ ProcessSwap.CrossOriginBlobNavigation >+ ProcessSwap.NavigateToAboutBlank >+ ProcessSwap.NavigateToDataURL >+ >+ * loader/NavigationAction.cpp: >+ (WebCore::treatAsSameOriginNavigation): >+ * loader/NavigationAction.h: >+ (WebCore::NavigationAction::treatAsSameOriginNavigation const): >+ > 2018-04-24 Ryosuke Niwa <rniwa@webkit.org> > > Release assert in ScriptController::canExecuteScripts via CachedSVGFont::ensureCustomFontData during >Index: Source/WebCore/loader/NavigationAction.cpp >=================================================================== >--- Source/WebCore/loader/NavigationAction.cpp (revision 230982) >+++ Source/WebCore/loader/NavigationAction.cpp (working copy) >@@ -44,6 +44,13 @@ NavigationAction::NavigationAction(Navig > NavigationAction& NavigationAction::operator=(const NavigationAction&) = default; > NavigationAction& NavigationAction::operator=(NavigationAction&&) = default; > >+static bool shouldTreatAsSameOriginNavigation(Document& source, const URL& url) >+{ >+ return url.isBlankURL() >+ || url.protocolIsData() >+ || (url.protocolIsBlob() && source.securityOrigin().canRequest(url)); >+} >+ > NavigationAction::NavigationAction(Document& source, const ResourceRequest& resourceRequest, InitiatedByMainFrame initiatedByMainFrame, NavigationType type, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Event* event, const AtomicString& downloadAttribute) > : m_sourceDocument { makeRefPtr(source) } > , m_resourceRequest { resourceRequest } >@@ -52,6 +59,7 @@ NavigationAction::NavigationAction(Docum > , m_initiatedByMainFrame { initiatedByMainFrame } > , m_event { event } > , m_downloadAttribute { downloadAttribute } >+ , m_treatAsSameOriginNavigation { shouldTreatAsSameOriginNavigation(source, resourceRequest.url()) } > { > } > >@@ -76,6 +84,7 @@ NavigationAction::NavigationAction(Docum > , m_initiatedByMainFrame { initiatedByMainFrame } > , m_event { event } > , m_downloadAttribute { downloadAttribute } >+ , m_treatAsSameOriginNavigation { shouldTreatAsSameOriginNavigation(source, resourceRequest.url()) } > { > } > >Index: Source/WebCore/loader/NavigationAction.h >=================================================================== >--- Source/WebCore/loader/NavigationAction.h (revision 230982) >+++ Source/WebCore/loader/NavigationAction.h (working copy) >@@ -72,6 +72,8 @@ public: > > const AtomicString& downloadAttribute() const { return m_downloadAttribute; } > >+ bool treatAsSameOriginNavigation() const { return m_treatAsSameOriginNavigation; } >+ > void setIsCrossOriginWindowOpenNavigation(bool value) { m_isCrossOriginWindowOpenNavigation = value; } > bool isCrossOriginWindowOpenNavigation() const { return m_isCrossOriginWindowOpenNavigation; } > >@@ -87,6 +89,7 @@ private: > RefPtr<Event> m_event; > RefPtr<UserGestureToken> m_userGestureToken { UserGestureIndicator::currentUserGesture() }; > AtomicString m_downloadAttribute; >+ bool m_treatAsSameOriginNavigation; > bool m_isCrossOriginWindowOpenNavigation { false }; > std::optional<std::pair<uint64_t /* pageID */, uint64_t /* frameID */>> m_opener; > }; >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 230982) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,37 @@ >+2018-04-25 Ryosuke Niwa <rniwa@webkit.org> >+ >+ PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank >+ https://bugs.webkit.org/show_bug.cgi?id=184962 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Don't create a new WebContent process when navigating to a blob object URL since doing so >+ can result in a race condition in which the blog URL is removed from the blob registry of >+ the network process by the time the navigation gets commited. This causes a failure in >+ fast/dom/HTMLAnchorElement/anchor-download-unset.html and oher layout tests. >+ >+ In the future, the network process should verify that a given WebContent process has access >+ to a given blob URL. For now, we rely on WebContent process to tell us whether it can >+ navigate to a given blob URL or not. >+ >+ * Shared/NavigationActionData.cpp: >+ (WebKit::NavigationActionData::encode const): Encode newly added treatAsSameOriginNavigation. >+ (WebKit::NavigationActionData::decode): Ditto for decoding. >+ * Shared/NavigationActionData.h: >+ (WebKit::NavigationActionData::treatAsSameOriginNavigation): Added. >+ * UIProcess/API/APINavigation.h: >+ (API::Navigation::settreatAsSameOriginNavigation): Added. >+ (API::Navigation::treatAsSameOriginNavigation const): Added. >+ * UIProcess/API/APIProcessPoolConfiguration.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::decidePolicyForNavigationAction): Use the current process when >+ treatAsSameOriginNavigation is set to true; i.e. when navigating to a blob URL the current >+ document has access. >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::processForNavigation): >+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: >+ (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): >+ > 2018-04-24 Fujii Hironori <Hironori.Fujii@sony.com> > > [WinCairo] Add WKView and WKAPI >Index: Source/WebKit/Shared/NavigationActionData.cpp >=================================================================== >--- Source/WebKit/Shared/NavigationActionData.cpp (revision 230982) >+++ Source/WebKit/Shared/NavigationActionData.cpp (working copy) >@@ -47,6 +47,7 @@ void NavigationActionData::encode(IPC::E > encoder << downloadAttribute; > encoder << clickLocationInRootViewCoordinates; > encoder << isRedirect; >+ encoder << treatAsSameOriginNavigation; > encoder << isCrossOriginWindowOpenNavigation; > encoder << opener; > } >@@ -97,6 +98,11 @@ std::optional<NavigationActionData> Navi > if (!isRedirect) > return std::nullopt; > >+ std::optional<bool> treatAsSameOriginNavigation; >+ decoder >> treatAsSameOriginNavigation; >+ if (!treatAsSameOriginNavigation) >+ return std::nullopt; >+ > std::optional<bool> isCrossOriginWindowOpenNavigation; > decoder >> isCrossOriginWindowOpenNavigation; > if (!isCrossOriginWindowOpenNavigation) >@@ -107,7 +113,9 @@ std::optional<NavigationActionData> Navi > if (!opener) > return std::nullopt; > >- return {{ WTFMove(navigationType), WTFMove(modifiers), WTFMove(mouseButton), WTFMove(syntheticClickType), WTFMove(*userGestureTokenIdentifier), WTFMove(*canHandleRequest), WTFMove(shouldOpenExternalURLsPolicy), WTFMove(*downloadAttribute), WTFMove(clickLocationInRootViewCoordinates), WTFMove(*isRedirect), *isCrossOriginWindowOpenNavigation, WTFMove(*opener) }}; >+ return {{ WTFMove(navigationType), WTFMove(modifiers), WTFMove(mouseButton), WTFMove(syntheticClickType), WTFMove(*userGestureTokenIdentifier), >+ WTFMove(*canHandleRequest), WTFMove(shouldOpenExternalURLsPolicy), WTFMove(*downloadAttribute), WTFMove(clickLocationInRootViewCoordinates), >+ WTFMove(*isRedirect), *treatAsSameOriginNavigation, *isCrossOriginWindowOpenNavigation, WTFMove(*opener) }}; > } > > } // namespace WebKit >Index: Source/WebKit/Shared/NavigationActionData.h >=================================================================== >--- Source/WebKit/Shared/NavigationActionData.h (revision 230982) >+++ Source/WebKit/Shared/NavigationActionData.h (working copy) >@@ -50,6 +50,7 @@ struct NavigationActionData { > WTF::String downloadAttribute; > WebCore::FloatPoint clickLocationInRootViewCoordinates; > bool isRedirect { false }; >+ bool treatAsSameOriginNavigation { false }; > bool isCrossOriginWindowOpenNavigation { false }; > std::optional<std::pair<uint64_t, uint64_t>> opener; > }; >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 230982) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -3956,6 +3956,7 @@ void WebPageProxy::decidePolicyForNaviga > navigation->setShouldForceDownload(!navigationActionData.downloadAttribute.isNull()); > navigation->setCurrentRequest(ResourceRequest(request), m_process->coreProcessIdentifier()); > navigation->setCurrentRequestIsRedirect(navigationActionData.isRedirect); >+ navigation->settreatAsSameOriginNavigation(navigationActionData.treatAsSameOriginNavigation); > navigation->setIsCrossOriginWindowOpenNavigation(navigationActionData.isCrossOriginWindowOpenNavigation); > navigation->setOpener(navigationActionData.opener); > >Index: Source/WebKit/UIProcess/WebProcessPool.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebProcessPool.cpp (revision 230982) >+++ Source/WebKit/UIProcess/WebProcessPool.cpp (working copy) >@@ -2024,6 +2024,9 @@ Ref<WebProcessProxy> WebProcessPool::pro > if (!page.process().hasCommittedAnyProvisionalLoads()) > return page.process(); > >+ if (navigation.treatAsSameOriginNavigation()) >+ return page.process(); >+ > if (navigation.isCrossOriginWindowOpenNavigation()) { > if (navigation.opener() && !m_configuration->processSwapsOnWindowOpenWithOpener()) > return page.process(); >Index: Source/WebKit/UIProcess/API/APINavigation.h >=================================================================== >--- Source/WebKit/UIProcess/API/APINavigation.h (revision 230982) >+++ Source/WebKit/UIProcess/API/APINavigation.h (working copy) >@@ -84,6 +84,9 @@ public: > void setShouldForceDownload(bool value) { m_shouldForceDownload = value; } > bool shouldForceDownload() const { return m_shouldForceDownload; } > >+ void settreatAsSameOriginNavigation(bool value) { m_treatAsSameOriginNavigation = value; } >+ bool treatAsSameOriginNavigation() const { return m_treatAsSameOriginNavigation; } >+ > void setIsCrossOriginWindowOpenNavigation(bool value) { m_isCrossOriginWindowOpenNavigation = value; } > bool isCrossOriginWindowOpenNavigation() const { return m_isCrossOriginWindowOpenNavigation; } > >@@ -111,6 +114,7 @@ private: > RefPtr<WebKit::WebBackForwardListItem> m_targetItem; > RefPtr<WebKit::WebBackForwardListItem> m_fromItem; > std::optional<WebCore::FrameLoadType> m_backForwardFrameLoadType; >+ bool m_treatAsSameOriginNavigation { false }; > bool m_isCrossOriginWindowOpenNavigation { false }; > std::optional<std::pair<uint64_t, uint64_t>> m_opener; > }; >Index: Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (revision 230982) >+++ Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (working copy) >@@ -864,6 +864,7 @@ void WebFrameLoaderClient::dispatchDecid > navigationActionData.shouldOpenExternalURLsPolicy = navigationAction.shouldOpenExternalURLsPolicy(); > navigationActionData.downloadAttribute = navigationAction.downloadAttribute(); > navigationActionData.isRedirect = didReceiveRedirectResponse; >+ navigationActionData.treatAsSameOriginNavigation = navigationAction.treatAsSameOriginNavigation(); > navigationActionData.isCrossOriginWindowOpenNavigation = navigationAction.isCrossOriginWindowOpenNavigation(); > navigationActionData.opener = navigationAction.opener(); > >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 230987) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-04-25 Ryosuke Niwa <rniwa@webkit.org> >+ >+ PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank >+ https://bugs.webkit.org/show_bug.cgi?id=184962 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added four test cases for navigating to a blob URL, data URL, and about:blank with process-swap-on-navigation turned on. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: >+ (ProcessSwap.SameOriginBlobNavigation): Added. >+ (ProcessSwap.CrossOriginBlobNavigation): Added. >+ (ProcessSwap.NavigateToAboutBlank): Added. >+ (ProcessSwap.NavigateToDataURL): Added. >+ > 2018-04-24 Pablo Saavedra <psaavedra@igalia.com> > > [GTK][WPE] Fix triggered bot name on the WPE Debug Build bot >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (revision 230982) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (working copy) >@@ -1054,4 +1054,178 @@ TEST(ProcessSwap, LoadUnload) > } > #endif // !TARGET_OS_IPHONE > >+static const char* sameOriginBlobNavigationTestBytes = R"PSONRESOURCE( >+<!DOCTYPE html> >+<html> >+<body> >+<p><a id="link">Click here</a></p> >+<script> >+const blob = new Blob(['<!DOCTYPE html><html><p>PASS</p></html>'], {type: 'text/html'}); >+link.href = URL.createObjectURL(blob); >+</script> >+)PSONRESOURCE"; >+ >+TEST(ProcessSwap, SameOriginBlobNavigation) >+{ >+ auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >+ processPoolConfiguration.get().processSwapsOnNavigation = YES; >+ auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); >+ >+ auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ [webViewConfiguration setProcessPool:processPool.get()]; >+ RetainPtr<PSONScheme> handler = adoptNS([[PSONScheme alloc] initWithBytes:sameOriginBlobNavigationTestBytes]); >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON"]; >+ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); >+ auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); >+ [webView setNavigationDelegate:navigationDelegate.get()]; >+ auto uiDelegate = adoptNS([[PSONUIDelegate alloc] initWithNavigationDelegate:navigationDelegate.get()]); >+ [webView setUIDelegate:uiDelegate.get()]; >+ >+ numberOfDecidePolicyCalls = 0; >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://host/main1.html"]]]; >+ >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid1 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid1); >+ >+ [webView _evaluateJavaScriptWithoutUserGesture:@"document.getElementById('link').click()" completionHandler: nil]; >+ >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid2 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid2); >+ EXPECT_EQ(2, numberOfDecidePolicyCalls); >+ EXPECT_EQ(pid1, pid2); >+} >+ >+TEST(ProcessSwap, CrossOriginBlobNavigation) >+{ >+ auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >+ processPoolConfiguration.get().processSwapsOnNavigation = YES; >+ auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); >+ >+ auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ [webViewConfiguration setProcessPool:processPool.get()]; >+ RetainPtr<PSONScheme> handler = adoptNS([[PSONScheme alloc] initWithBytes:sameOriginBlobNavigationTestBytes]); >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON1"]; >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON2"]; >+ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); >+ auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); >+ [webView setNavigationDelegate:navigationDelegate.get()]; >+ auto uiDelegate = adoptNS([[PSONUIDelegate alloc] initWithNavigationDelegate:navigationDelegate.get()]); >+ [webView setUIDelegate:uiDelegate.get()]; >+ >+ numberOfDecidePolicyCalls = 0; >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson1://host/main1.html"]]]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid1 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid1); >+ >+ bool finishedRunningScript = false; >+ String blobURL; >+ [webView _evaluateJavaScriptWithoutUserGesture:@"document.getElementById('link').href" completionHandler: [&] (id result, NSError *error) { >+ blobURL = String([NSString stringWithFormat:@"%@", result]); >+ finishedRunningScript = true; >+ }]; >+ TestWebKitAPI::Util::run(&finishedRunningScript); >+ >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson2://host/main1.html"]]]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid2 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid2); >+ >+ finishedRunningScript = false; >+ String script = "document.getElementById('link').href = '" + blobURL + "'"; >+ [webView _evaluateJavaScriptWithoutUserGesture:(NSString *)script completionHandler: [&] (id result, NSError *error) { >+ finishedRunningScript = true; >+ }]; >+ TestWebKitAPI::Util::run(&finishedRunningScript); >+ >+ // This navigation will fail. >+ [webView _evaluateJavaScriptWithoutUserGesture:@"document.getElementById('link').click()" completionHandler: [&] (id result, NSError *error) { >+ done = true; >+ }]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid3 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid3); >+ >+ EXPECT_EQ(2, numberOfDecidePolicyCalls); >+ EXPECT_NE(pid1, pid2); >+ EXPECT_EQ(pid2, pid3); >+} >+ >+TEST(ProcessSwap, NavigateToAboutBlank) >+{ >+ auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >+ processPoolConfiguration.get().processSwapsOnNavigation = YES; >+ auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); >+ >+ auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ [webViewConfiguration setProcessPool:processPool.get()]; >+ RetainPtr<PSONScheme> handler = adoptNS([[PSONScheme alloc] initWithBytes:sameOriginBlobNavigationTestBytes]); >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON"]; >+ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); >+ auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); >+ [webView setNavigationDelegate:navigationDelegate.get()]; >+ auto uiDelegate = adoptNS([[PSONUIDelegate alloc] initWithNavigationDelegate:navigationDelegate.get()]); >+ [webView setUIDelegate:uiDelegate.get()]; >+ >+ numberOfDecidePolicyCalls = 0; >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://host/main1.html"]]]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid1 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid1); >+ >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid2 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid2); >+ >+ EXPECT_EQ(2, numberOfDecidePolicyCalls); >+ EXPECT_EQ(pid1, pid2); >+} >+ >+TEST(ProcessSwap, NavigateToDataURL) >+{ >+ auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >+ processPoolConfiguration.get().processSwapsOnNavigation = YES; >+ auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); >+ >+ auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ [webViewConfiguration setProcessPool:processPool.get()]; >+ RetainPtr<PSONScheme> handler = adoptNS([[PSONScheme alloc] initWithBytes:sameOriginBlobNavigationTestBytes]); >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON"]; >+ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); >+ auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); >+ [webView setNavigationDelegate:navigationDelegate.get()]; >+ auto uiDelegate = adoptNS([[PSONUIDelegate alloc] initWithNavigationDelegate:navigationDelegate.get()]); >+ [webView setUIDelegate:uiDelegate.get()]; >+ >+ numberOfDecidePolicyCalls = 0; >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://host/main1.html"]]]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid1 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid1); >+ >+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/plain,PASS"]]]; >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pid2 = [webView _webProcessIdentifier]; >+ EXPECT_TRUE(!!pid2); >+ >+ EXPECT_EQ(2, numberOfDecidePolicyCalls); >+ EXPECT_EQ(pid1, pid2); >+} >+ > #endif // WK_API_ENABLED
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
youennf
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 184962
:
338716
| 338766