WebKit Bugzilla
Attachment 342453 Details for
Bug 186534
: Add a command line default to force WebKitTestRunner to turn on process swap on navigation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186534-20180611120129.patch (text/plain), 6.35 KB, created by
Brady Eidson
on 2018-06-11 12:01:30 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brady Eidson
Created:
2018-06-11 12:01:30 PDT
Size:
6.35 KB
patch
obsolete
>Subversion Revision: 232720 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 1ad6b83000ce08bfe8d1fe6481ebc1a48f301efe..265f8512ea167634ea9abcbc360be6a5588b8d51 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,27 @@ >+2018-06-11 Brady Eidson <beidson@apple.com> >+ >+ Add a command line default to force WebKitTestRunner to turn on process swap on navigation. >+ https://bugs.webkit.org/show_bug.cgi?id=186534 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Right now Process Swap On Navigation is enabled on a per-test basis. >+ >+ The future is to enable it by default. >+ Adding a 'defaults write' helps us get to that future. >+ >+ * WebKitTestRunner/TestController.cpp: >+ (WTR::TestController::createWebViewWithOptions): >+ (WTR::updateTestOptionsFromTestHeader): >+ (WTR::TestController::testOptionsForTest const): >+ (WTR::TestController::platformAddTestOptions const): >+ * WebKitTestRunner/TestController.h: >+ >+ * WebKitTestRunner/TestOptions.h: >+ >+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm: >+ (WTR::TestController::platformAddTestOptions const): >+ > 2018-06-11 Philippe Normand <pnormand@igalia.com> > > [webkitpy] PHP7.2 support on Debian platforms >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index bed37b30cde3da6dce9d90635aa343e7478086cd..da40b7c88e6d23b3b4d8934309fa8b42be5cdaf6 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -506,10 +506,11 @@ void TestController::createWebViewWithOptions(const TestOptions& options) > WKArrayAppendItem(overrideLanguages.get(), adoptWK(WKStringCreateWithUTF8CString(language.utf8().data())).get()); > WKContextConfigurationSetOverrideLanguages(contextConfiguration.get(), overrideLanguages.get()); > >- if (options.enableProcessSwapOnNavigation) { >+ if (options.enableProcessSwapOnNavigation) > WKContextConfigurationSetProcessSwapsOnNavigation(contextConfiguration.get(), true); >+ >+ if (options.enableProcessSwapOnWindowOpen) > WKContextConfigurationSetProcessSwapsOnWindowOpenWithOpener(contextConfiguration.get(), true); >- } > > auto configuration = generatePageConfiguration(contextConfiguration.get()); > >@@ -1118,8 +1119,12 @@ static void updateTestOptionsFromTestHeader(TestOptions& testOptions, const std: > testOptions.allowCrossOriginSubresourcesToAskForCredentials = parseBooleanTestHeaderValue(value); > if (key == "enableWebAnimationsCSSIntegration") > testOptions.enableWebAnimationsCSSIntegration = parseBooleanTestHeaderValue(value); >- if (key == "enableProcessSwapOnNavigation") >+ if (key == "enableProcessSwapOnNavigation") { >+ // When a test enabled process-swap-on-navigation, it also implicitly enables process swapping on window open (with no opener) >+ // This is in contrast to when process-swap-on-navigation is enabled by outside preferences. > testOptions.enableProcessSwapOnNavigation = parseBooleanTestHeaderValue(value); >+ testOptions.enableProcessSwapOnWindowOpen = testOptions.enableProcessSwapOnNavigation; >+ } > if (key == "enableColorFilter") > testOptions.enableColorFilter = parseBooleanTestHeaderValue(value); > pairStart = pairEnd + 1; >@@ -1135,6 +1140,7 @@ TestOptions TestController::testOptionsForTest(const TestCommand& command) const > > updatePlatformSpecificTestOptionsForTest(options, command.pathOrURL); > updateTestOptionsFromTestHeader(options, command.pathOrURL, command.absolutePath); >+ platformAddTestOptions(options); > > return options; > } >@@ -2854,4 +2860,10 @@ void TestController::statisticsResetToConsistentState() > WKWebsiteDataStoreStatisticsResetToConsistentState(dataStore); > } > >+#if !PLATFORM(COCOA) >+void TestController::platformAddTestOptions(TestOptions&) const >+{ >+} >+#endif >+ > } // namespace WTR >diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h >index 7303209e0871f0324fd5248f8841e2a47910f150..f33783443ef62ab0cddf8898aae0767adde1cb21 100644 >--- a/Tools/WebKitTestRunner/TestController.h >+++ b/Tools/WebKitTestRunner/TestController.h >@@ -227,6 +227,7 @@ private: > void platformDestroy(); > WKContextRef platformAdjustContext(WKContextRef, WKContextConfigurationRef); > void platformInitializeContext(); >+ void platformAddTestOptions(TestOptions&) const; > void platformCreateWebView(WKPageConfigurationRef, const TestOptions&); > static PlatformWebView* platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions&); > void platformResetPreferencesToConsistentValues(); >diff --git a/Tools/WebKitTestRunner/TestOptions.h b/Tools/WebKitTestRunner/TestOptions.h >index 1e1ff427e50271b0393cdb29dcdf189b9fe10246..11c611cb36dc9992f06dc13dd077b018cb6498a9 100644 >--- a/Tools/WebKitTestRunner/TestOptions.h >+++ b/Tools/WebKitTestRunner/TestOptions.h >@@ -57,6 +57,7 @@ struct TestOptions { > bool allowCrossOriginSubresourcesToAskForCredentials { false }; > bool enableWebAnimationsCSSIntegration { false }; > bool enableProcessSwapOnNavigation { false }; >+ bool enableProcessSwapOnWindowOpen { false }; > bool enableColorFilter { false }; > > float deviceScaleFactor { 1 }; >diff --git a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >index 6bc46870b654f00e05210ba4b4927a819cdb4171..4b5d6c541695ab84a5f6506e0e537cc41681e2df 100644 >--- a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >+++ b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >@@ -46,7 +46,6 @@ > #import <WebKit/WKWebsiteDataStorePrivate.h> > #import <WebKit/WKWebsiteDataStoreRef.h> > #import <WebKit/_WKApplicationManifest.h> >-#import <WebKit/_WKProcessPoolConfiguration.h> > #import <WebKit/_WKUserContentExtensionStore.h> > #import <WebKit/_WKUserContentExtensionStorePrivate.h> > #import <wtf/MainThread.h> >@@ -128,6 +127,12 @@ WKPreferencesRef TestController::platformPreferences() > #endif > } > >+void TestController::platformAddTestOptions(TestOptions& options) const >+{ >+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"EnableProcessSwapOnNavigation"]) >+ options.enableProcessSwapOnNavigation = true; >+} >+ > void TestController::platformCreateWebView(WKPageConfigurationRef, const TestOptions& options) > { > #if 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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186534
:
342453
|
342458
|
342463