WebKit Bugzilla
Attachment 357646 Details for
Bug 192735
: Allow clients to set the navigator platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192735-20181218193838.patch (text/plain), 19.67 KB, created by
Megan Gardner
on 2018-12-18 19:38:39 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-12-18 19:38:39 PST
Size:
19.67 KB
patch
obsolete
>Subversion Revision: 239338 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 979627908835a511fa6c904d8b2300da8c26221c..a48fe68a32847492e21604e4b9b656024bb94930 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2018-12-18 Megan Gardner <megan_gardner@apple.com> >+ >+ Allow clients to set the navigator platform >+ https://bugs.webkit.org/show_bug.cgi?id=192735 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm. >+ >+ Lots of piping to allow the setting of a custom navigator platform. >+ >+ * loader/DocumentLoader.h: >+ (WebCore::DocumentLoader::setCustomNavigatorPlatform): >+ (WebCore::DocumentLoader::customNavigatorPlatform const): >+ * loader/FrameLoader.cpp: >+ (WebCore::FrameLoader::navigatorPlatform const): >+ * loader/FrameLoader.h: >+ * page/Navigator.cpp: >+ (WebCore::Navigator::platform const): >+ * page/Navigator.h: >+ * page/NavigatorBase.cpp: >+ (WebCore::NavigatorBase::platform const): >+ (WebCore::NavigatorBase::platform): Deleted. >+ * page/NavigatorBase.h: >+ > 2018-12-18 Wenson Hsieh <wenson_hsieh@apple.com> > > Calling setValue() while typing should invoke -textDidChangeInTextField in the injected bundle >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6c8822de09151b025fc2382e5a810e45b84c0904..910003e8a0a4f9ba0d2733a5c6a8711f320f929e 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,30 @@ >+2018-12-18 Megan Gardner <megan_gardner@apple.com> >+ >+ Allow clients to set the navigator platform >+ https://bugs.webkit.org/show_bug.cgi?id=192735 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add private API to allow clients to override the default navigator >+ platform. Some websites check for the platform, which >+ interfears with our request desktop site feature. This should >+ help more sites function as expected. >+ >+ * Shared/WebsitePoliciesData.cpp: >+ (WebKit::WebsitePoliciesData::encode const): >+ (WebKit::WebsitePoliciesData::decode): >+ (WebKit::WebsitePoliciesData::applyToDocumentLoader): >+ * Shared/WebsitePoliciesData.h: >+ * UIProcess/API/APIWebsitePolicies.cpp: >+ (API::WebsitePolicies::data): >+ * UIProcess/API/APIWebsitePolicies.h: >+ * UIProcess/API/Cocoa/_WKWebsitePolicies.h: >+ * UIProcess/API/Cocoa/_WKWebsitePolicies.mm: >+ (-[_WKWebsitePolicies setCustomNavigatorPlatform:]): >+ (-[_WKWebsitePolicies customNavigatorPlatform]): >+ * UIProcess/Cocoa/NavigationState.mm: >+ (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): >+ > 2018-12-18 Chris Dumez <cdumez@apple.com> > > Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index e24389c31e7c7067ffe45bc6410bb4a5fe419ada..5f1c176928e2264c63c755bd26067ed45651642f 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-14 Megan Gardner <megan_gardner@apple.com> >+ >+ Allow clients to set the navigator platform >+ https://bugs.webkit.org/show_bug.cgi?id=192735 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add stubs to fill out the added functionality in FrameLoaderClient. >+ >+ * WebCoreSupport/WebFrameLoaderClient.h: >+ * WebCoreSupport/WebFrameLoaderClient.mm: >+ (WebFrameLoaderClient::navigatorPlatform): >+ > 2018-12-17 Ryosuke Niwa <rniwa@webkit.org> > > offsetLeft and offsetParent should adjust across shadow boundaries >diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h >index feac90020b78a74ebdd77248041d91ab085bcc25..c8d00a1563cb7cd3d7ac96e79b2a998962904dd5 100644 >--- a/Source/WebCore/loader/DocumentLoader.h >+++ b/Source/WebCore/loader/DocumentLoader.h >@@ -266,6 +266,9 @@ public: > > void setCustomUserAgent(const String& customUserAgent) { m_customUserAgent = customUserAgent; } > const String& customUserAgent() const { return m_customUserAgent; } >+ >+ void setCustomNavigatorPlatform(const String& customNavigatorPlatform) { m_customNavigatorPlatform = customNavigatorPlatform; } >+ const String& customNavigatorPlatform() const { return m_customNavigatorPlatform; } > > OptionSet<AutoplayQuirk> allowedAutoplayQuirks() const { return m_allowedAutoplayQuirks; } > void setAllowedAutoplayQuirks(OptionSet<AutoplayQuirk> allowedQuirks) { m_allowedAutoplayQuirks = allowedQuirks; } >@@ -536,6 +539,7 @@ private: > HashMap<String, Vector<std::pair<String, uint32_t>>> m_pendingContentExtensionDisplayNoneSelectors; > #endif > String m_customUserAgent; >+ String m_customNavigatorPlatform; > bool m_userContentExtensionsEnabled { true }; > AutoplayPolicy m_autoplayPolicy { AutoplayPolicy::Default }; > OptionSet<AutoplayQuirk> m_allowedAutoplayQuirks; >diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp >index 55354791147e588a094eb6cbac1b427a17efddae..a6efedbc65614e2072efbabe35e82fc8e83d99ba 100644 >--- a/Source/WebCore/loader/FrameLoader.cpp >+++ b/Source/WebCore/loader/FrameLoader.cpp >@@ -2677,6 +2677,16 @@ String FrameLoader::userAgent(const URL& url) const > > return m_client.userAgent(url); > } >+ >+String FrameLoader::navigatorPlatform() const >+{ >+ if (auto* documentLoader = m_frame.mainFrame().loader().activeDocumentLoader()) { >+ auto& customNavigatorPlatform = documentLoader->customNavigatorPlatform(); >+ if (!customNavigatorPlatform.isEmpty()) >+ return customNavigatorPlatform; >+ } >+ return String(); >+} > > void FrameLoader::dispatchOnloadEvents() > { >diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h >index 2d8295532da1ff34ff5e1ce1316642611a0fc01e..a04aeb46bd9bba0a35ebb02230939cb215ee33ca 100644 >--- a/Source/WebCore/loader/FrameLoader.h >+++ b/Source/WebCore/loader/FrameLoader.h >@@ -234,6 +234,7 @@ public: > > void dispatchOnloadEvents(); > String userAgent(const URL&) const; >+ String navigatorPlatform() const; > > void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld&); > void dispatchDidClearWindowObjectsInAllWorlds(); >diff --git a/Source/WebCore/page/Navigator.cpp b/Source/WebCore/page/Navigator.cpp >index a40fd22670f3f64197aabe7b4c375716b7404804..04eda1b90920d2eb32a0535ca503bc19f46012a2 100644 >--- a/Source/WebCore/page/Navigator.cpp >+++ b/Source/WebCore/page/Navigator.cpp >@@ -95,6 +95,24 @@ const String& Navigator::userAgent() const > m_userAgent = frame->loader().userAgent(frame->document()->url()); > return m_userAgent; > } >+ >+const String& Navigator::platform() const >+{ >+#if !OS(LINUX) >+ auto* frame = this->frame(); >+ if (!frame || !frame->page()) >+ return m_platform; >+ >+ if (m_platform.isNull()) >+ m_platform = frame->loader().navigatorPlatform(); >+ >+ if (m_platform.isNull()) >+ m_platform = NavigatorBase::platform(); >+ return m_platform; >+#else >+ return NavigatorBase::platform(); >+#endif >+} > > void Navigator::userAgentChanged() > { >diff --git a/Source/WebCore/page/Navigator.h b/Source/WebCore/page/Navigator.h >index eb3a058b6d26af85d8969697f28db54ec13bc37a..2a42a199f9e995aff449e40236221b2b0755271a 100644 >--- a/Source/WebCore/page/Navigator.h >+++ b/Source/WebCore/page/Navigator.h >@@ -42,6 +42,7 @@ public: > bool cookieEnabled() const; > bool javaEnabled() const; > const String& userAgent() const final; >+ const String& platform() const final; > void userAgentChanged(); > bool onLine() const final; > void share(ScriptExecutionContext&, ShareData, Ref<DeferredPromise>&&); >@@ -58,6 +59,7 @@ private: > mutable RefPtr<DOMPluginArray> m_plugins; > mutable RefPtr<DOMMimeTypeArray> m_mimeTypes; > mutable String m_userAgent; >+ mutable String m_platform; > }; > > } >diff --git a/Source/WebCore/page/NavigatorBase.cpp b/Source/WebCore/page/NavigatorBase.cpp >index 349552c0a6873575b28cd96d622dfe054f09d6ab..da8794db4f62e65ca93c73704f5e4115e2fc7fe0 100644 >--- a/Source/WebCore/page/NavigatorBase.cpp >+++ b/Source/WebCore/page/NavigatorBase.cpp >@@ -100,16 +100,17 @@ String NavigatorBase::appVersion() const > return agent.substring(agent.find('/') + 1); > } > >-String NavigatorBase::platform() >+const String& NavigatorBase::platform() const > { >+ static NeverDestroyed<String> defaultPlatform = WEBCORE_NAVIGATOR_PLATFORM; > #if OS(LINUX) > if (!String(WEBCORE_NAVIGATOR_PLATFORM).isEmpty()) >- return WEBCORE_NAVIGATOR_PLATFORM; >+ return defaultPlatform; > struct utsname osname; > static NeverDestroyed<String> platformName(uname(&osname) >= 0 ? String(osname.sysname) + " "_str + String(osname.machine) : emptyString()); > return platformName; > #else >- return WEBCORE_NAVIGATOR_PLATFORM; >+ return defaultPlatform; > #endif > } > >diff --git a/Source/WebCore/page/NavigatorBase.h b/Source/WebCore/page/NavigatorBase.h >index d42b39353f22bd1c1c98e56f318bb0a733e79d4b..5af588187b6407a8adc1d448023268a004a7a44c 100644 >--- a/Source/WebCore/page/NavigatorBase.h >+++ b/Source/WebCore/page/NavigatorBase.h >@@ -43,7 +43,7 @@ public: > static String appName(); > String appVersion() const; > virtual const String& userAgent() const = 0; >- static String platform(); >+ virtual const String& platform() const; > > static String appCodeName(); > static String product(); >diff --git a/Source/WebKit/Shared/WebsitePoliciesData.cpp b/Source/WebKit/Shared/WebsitePoliciesData.cpp >index df6d3ae2c187da405b548d6774a85d295edada1e..aab10e85e127765263beb9ac601ea22ff724b19b 100644 >--- a/Source/WebKit/Shared/WebsitePoliciesData.cpp >+++ b/Source/WebKit/Shared/WebsitePoliciesData.cpp >@@ -43,6 +43,7 @@ void WebsitePoliciesData::encode(IPC::Encoder& encoder) const > encoder << popUpPolicy; > encoder << websiteDataStoreParameters; > encoder << customUserAgent; >+ encoder << customNavigatorPlatform; > } > > std::optional<WebsitePoliciesData> WebsitePoliciesData::decode(IPC::Decoder& decoder) >@@ -81,6 +82,11 @@ std::optional<WebsitePoliciesData> WebsitePoliciesData::decode(IPC::Decoder& dec > decoder >> customUserAgent; > if (!customUserAgent) > return std::nullopt; >+ >+ std::optional<String> customNavigatorPlatform; >+ decoder >> customNavigatorPlatform; >+ if (!customNavigatorPlatform) >+ return std::nullopt; > > return { { > WTFMove(*contentBlockersEnabled), >@@ -90,6 +96,7 @@ std::optional<WebsitePoliciesData> WebsitePoliciesData::decode(IPC::Decoder& dec > WTFMove(*popUpPolicy), > WTFMove(*websiteDataStoreParameters), > WTFMove(*customUserAgent), >+ WTFMove(*customNavigatorPlatform), > } }; > } > >@@ -97,6 +104,7 @@ void WebsitePoliciesData::applyToDocumentLoader(WebsitePoliciesData&& websitePol > { > documentLoader.setCustomHeaderFields(WTFMove(websitePolicies.customHeaderFields)); > documentLoader.setCustomUserAgent(websitePolicies.customUserAgent); >+ documentLoader.setCustomNavigatorPlatform(websitePolicies.customNavigatorPlatform); > > // Only setUserContentExtensionsEnabled if it hasn't already been disabled by reloading without content blockers. > if (documentLoader.userContentExtensionsEnabled()) >diff --git a/Source/WebKit/Shared/WebsitePoliciesData.h b/Source/WebKit/Shared/WebsitePoliciesData.h >index 7944c466ec60e1637a5a93428a17fa6da64d2427..d05eb43f0f65b882fa88a1cc45dbf0f1d31bec6f 100644 >--- a/Source/WebKit/Shared/WebsitePoliciesData.h >+++ b/Source/WebKit/Shared/WebsitePoliciesData.h >@@ -53,6 +53,7 @@ struct WebsitePoliciesData { > WebsitePopUpPolicy popUpPolicy { WebsitePopUpPolicy::Default }; > std::optional<WebsiteDataStoreParameters> websiteDataStoreParameters; > String customUserAgent; >+ String customNavigatorPlatform; > > void encode(IPC::Encoder&) const; > static std::optional<WebsitePoliciesData> decode(IPC::Decoder&); >diff --git a/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp b/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp >index f4414425a9d4abfacbba3876fe7c4c29cc45100c..e70a5f062bcd48e571e336d494dcc5958c123331 100644 >--- a/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp >+++ b/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp >@@ -56,7 +56,7 @@ WebKit::WebsitePoliciesData WebsitePolicies::data() > std::optional<WebKit::WebsiteDataStoreParameters> parameters; > if (m_websiteDataStore) > parameters = m_websiteDataStore->websiteDataStore().parameters(); >- return { contentBlockersEnabled(), allowedAutoplayQuirks(), autoplayPolicy(), customHeaderFields(), popUpPolicy(), WTFMove(parameters), m_customUserAgent }; >+ return { contentBlockersEnabled(), allowedAutoplayQuirks(), autoplayPolicy(), customHeaderFields(), popUpPolicy(), WTFMove(parameters), m_customUserAgent, m_customNavigatorPlatform }; > } > > } >diff --git a/Source/WebKit/UIProcess/API/APIWebsitePolicies.h b/Source/WebKit/UIProcess/API/APIWebsitePolicies.h >index 5f66abeba614b8a515676cf0afc7a00196d9e606..3f7aa061bf182c0c66f79ad997fa7ed9a3a320ad 100644 >--- a/Source/WebKit/UIProcess/API/APIWebsitePolicies.h >+++ b/Source/WebKit/UIProcess/API/APIWebsitePolicies.h >@@ -71,6 +71,9 @@ public: > > void setCustomUserAgent(const WTF::String& customUserAgent) { m_customUserAgent = customUserAgent; } > const WTF::String& customUserAgent() const { return m_customUserAgent; } >+ >+ void setCustomNavigatorPlatform(const WTF::String& customNavigatorPlatform) { m_customNavigatorPlatform = customNavigatorPlatform; } >+ const WTF::String& customNavigatorPlatform() const { return m_customNavigatorPlatform; } > > private: > WebsitePolicies(bool contentBlockersEnabled, OptionSet<WebKit::WebsiteAutoplayQuirk>, WebKit::WebsiteAutoplayPolicy, Vector<WebCore::HTTPHeaderField>&&, WebKit::WebsitePopUpPolicy, RefPtr<WebsiteDataStore>&&); >@@ -82,6 +85,7 @@ private: > WebKit::WebsitePopUpPolicy m_popUpPolicy { WebKit::WebsitePopUpPolicy::Default }; > RefPtr<WebsiteDataStore> m_websiteDataStore; > WTF::String m_customUserAgent; >+ WTF::String m_customNavigatorPlatform; > }; > > } // namespace API >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.h b/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.h >index ead50191863079a944d56bf7e1d992f07a9502fa..621a1564bf648f1ae265038a9553bbb92df393d6 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.h >@@ -58,6 +58,7 @@ WK_CLASS_AVAILABLE(macosx(10.12.3), ios(10.3)) > @property (nonatomic) _WKWebsitePopUpPolicy popUpPolicy WK_API_AVAILABLE(macosx(10.14), ios(12.0)); > @property (nonatomic, strong) WKWebsiteDataStore *websiteDataStore WK_API_AVAILABLE(macosx(10.13.4), ios(11.3)); > @property (nonatomic, copy) NSString *customUserAgent WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); >+@property (nonatomic, copy) NSString *customNavigatorPlatform WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > > @end > >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm >index 03bd177942e5baa91d5d69b08a607153d815cd45..7f3c8225449a78e9e15482846874f2464016c805 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm >@@ -193,6 +193,16 @@ - (NSString *)customUserAgent > return _websitePolicies->customUserAgent(); > } > >+- (void)setCustomNavigatorPlatform:(NSString *)customNavigatorPlatform >+{ >+ _websitePolicies->setCustomNavigatorPlatform(customNavigatorPlatform); >+} >+ >+- (NSString *)customNavigatorPlatform >+{ >+ return _websitePolicies->customNavigatorPlatform(); >+} >+ > - (NSString *)description > { > return [NSString stringWithFormat:@"<%@: %p; contentBlockersEnabled = %d>", NSStringFromClass(self.class), self, self.contentBlockersEnabled]; >diff --git a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >index f5ee4df18043d3b5a64b10d4c2e63740d9939772..e30b03f5f4c4cdc8b27dc6ac6c555ab89c9db8b7 100644 >--- a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >+++ b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >@@ -549,6 +549,8 @@ void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageP > } > if (!apiWebsitePolicies->customUserAgent().isNull() && subframeNavigation) > [NSException raise:NSInvalidArgumentException format:@"_WKWebsitePolicies.customUserAgent must be nil for subframe navigations."]; >+ if (!apiWebsitePolicies->customNavigatorPlatform().isNull() && subframeNavigation) >+ [NSException raise:NSInvalidArgumentException format:@"_WKWebsitePolicies.customNavigatorPlatform must be nil for subframe navigations."]; > } > > switch (actionPolicy) { >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 1525bb6ddb270f8ff6c5ee2b183c41a66e143593..57f30deedec4486cedff7b2caf009523d55c49c9 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-18 Megan Gardner <megan_gardner@apple.com> >+ >+ Allow clients to set the navigator platform >+ https://bugs.webkit.org/show_bug.cgi?id=192735 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a test for setting a custom navigator platform. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: >+ (-[CustomNavigatorPlatformDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): >+ (-[CustomNavigatorPlatformDelegate webView:didFinishNavigation:]): >+ > 2018-12-18 Chris Dumez <cdumez@apple.com> > > Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >index 2e89e3608bd59273dd138f34d9529e2e2ab0be49..b3658ef91909c62296f36052881b1c2420403952 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >@@ -983,6 +983,47 @@ TEST(WebKit, WebsitePoliciesCustomUserAgent) > loadCount = 0; > } > >+@interface CustomNavigatorPlatformDelegate : NSObject <WKNavigationDelegate> { >+} >+@end >+ >+@implementation CustomNavigatorPlatformDelegate >+ >+- (void)_webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction userInfo:(id <NSSecureCoding>)userInfo decisionHandler:(void (^)(WKNavigationActionPolicy, _WKWebsitePolicies *))decisionHandler >+{ >+ _WKWebsitePolicies *websitePolicies = [[[_WKWebsitePolicies alloc] init] autorelease]; >+ if (navigationAction.targetFrame.mainFrame) >+ [websitePolicies setCustomNavigatorPlatform:@"Test Custom Platform2"]; >+ >+ decisionHandler(WKNavigationActionPolicyAllow, websitePolicies); >+} >+ >+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation >+{ >+ finishedNavigation = true; >+} >+ >+@end >+ >+TEST(WebKit, WebsitePoliciesCustomNavigatorPlatform) >+{ >+ auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ >+ auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); >+ >+ auto delegate = adoptNS([[CustomNavigatorPlatformDelegate alloc] init]); >+ [webView setNavigationDelegate:delegate.get()]; >+ >+ NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/html,hello"]]; >+ [webView loadRequest:request]; >+ >+ TestWebKitAPI::Util::run(&finishedNavigation); >+ finishedNavigation = false; >+ >+ EXPECT_STREQ("Test Custom Platform2", [[webView stringByEvaluatingJavaScript:@"navigator.platform"] UTF8String]); >+} >+ >+ > @interface PopUpPoliciesDelegate : NSObject <WKNavigationDelegate, WKUIDelegatePrivate> > @property (nonatomic, copy) _WKWebsitePopUpPolicy(^popUpPolicyForURL)(NSURL *); > @end
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192735
:
357380
|
357387
|
357388
|
357389
|
357390
|
357618
|
357631
|
357634
|
357636
|
357646
|
357706