Title: [261882] trunk/Tools
- Revision
- 261882
- Author
- cdu...@apple.com
- Date
- 2020-05-19 13:09:03 -0700 (Tue, 19 May 2020)
Log Message
Turn on ITP in TestController::resetStateToConsistentValues()
https://bugs.webkit.org/show_bug.cgi?id=212076
Reviewed by Darin Adler.
Turn on ITP in TestController::resetStateToConsistentValues(), in a single place
instead of doing it in different places depending on whether or not the session
is ephemeral or not. It is also important to do it in resetStateToConsistentValues()
instead of doing it on data store creation because there is a testRunner method
that allows tests to turn off ITP.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::generatePageConfiguration):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::platformAdjustContext):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):
(WTR::TestController::platformInitializeDataStore):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (261881 => 261882)
--- trunk/Tools/ChangeLog 2020-05-19 19:59:25 UTC (rev 261881)
+++ trunk/Tools/ChangeLog 2020-05-19 20:09:03 UTC (rev 261882)
@@ -1,3 +1,24 @@
+2020-05-19 Chris Dumez <cdu...@apple.com>
+
+ Turn on ITP in TestController::resetStateToConsistentValues()
+ https://bugs.webkit.org/show_bug.cgi?id=212076
+
+ Reviewed by Darin Adler.
+
+ Turn on ITP in TestController::resetStateToConsistentValues(), in a single place
+ instead of doing it in different places depending on whether or not the session
+ is ephemeral or not. It is also important to do it in resetStateToConsistentValues()
+ instead of doing it on data store creation because there is a testRunner method
+ that allows tests to turn off ITP.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::generatePageConfiguration):
+ (WTR::TestController::resetStateToConsistentValues):
+ (WTR::TestController::platformAdjustContext):
+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+ (WTR::initializeWebViewConfiguration):
+ (WTR::TestController::platformInitializeDataStore):
+
2020-05-19 Lauro Moura <lmo...@igalia.com>
[Flatpak SDK] Use items instead of iteritems to make Python 3 happier.
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (261881 => 261882)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2020-05-19 19:59:25 UTC (rev 261881)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2020-05-19 20:09:03 UTC (rev 261882)
@@ -629,7 +629,6 @@
if (options.useEphemeralSession) {
auto ephemeralDataStore = adoptWK(WKWebsiteDataStoreCreateNonPersistentDataStore());
- WKWebsiteDataStoreSetResourceLoadStatisticsEnabled(ephemeralDataStore.get(), true);
WKPageConfigurationSetWebsiteDataStore(pageConfiguration.get(), ephemeralDataStore.get());
}
@@ -1028,6 +1027,8 @@
WKContextResetServiceWorkerFetchTimeoutForTesting(TestController::singleton().context());
+ WKWebsiteDataStoreSetResourceLoadStatisticsEnabled(websiteDataStore(), true);
+ WKContextSetStorageAccessAPIEnabled(platformContext(), true);
WKWebsiteDataStoreClearAllDeviceOrientationPermissions(websiteDataStore());
clearIndexedDatabases();
@@ -3133,7 +3134,6 @@
WKContextRef TestController::platformAdjustContext(WKContextRef context, WKContextConfigurationRef contextConfiguration)
{
- WKWebsiteDataStoreSetResourceLoadStatisticsEnabled(defaultWebsiteDataStore(), true);
WKContextSetPrimaryWebsiteDataStore(context, defaultWebsiteDataStore());
return context;
}
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (261881 => 261882)
--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2020-05-19 19:59:25 UTC (rev 261881)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2020-05-19 20:09:03 UTC (rev 261882)
@@ -72,10 +72,6 @@
globalWebViewConfiguration._allowTopNavigationToDataURLs = YES;
globalWebViewConfiguration._applePayEnabled = YES;
- WKContextSetStorageAccessAPIEnabled(context, true);
-
- [globalWebViewConfiguration.websiteDataStore _setResourceLoadStatisticsEnabled:YES];
-
[globalWebsiteDataStoreDelegateClient release];
globalWebsiteDataStoreDelegateClient = [[TestWebsiteDataStoreDelegate alloc] init];
[globalWebViewConfiguration.websiteDataStore set_delegate:globalWebsiteDataStoreDelegateClient];
@@ -139,9 +135,7 @@
configureWebsiteDataStoreTemporaryDirectories((WKWebsiteDataStoreConfigurationRef)websiteDataStoreConfig);
if (options.standaloneWebApplicationURL.length())
[websiteDataStoreConfig setStandaloneApplicationURL:[NSURL URLWithString:[NSString stringWithUTF8String:options.standaloneWebApplicationURL.c_str()]]];
- auto *websiteDataStore = [[[WKWebsiteDataStore alloc] _initWithConfiguration:websiteDataStoreConfig] autorelease];
- [websiteDataStore _setResourceLoadStatisticsEnabled:YES];
- m_websiteDataStore = (__bridge WKWebsiteDataStoreRef)websiteDataStore;
+ m_websiteDataStore = (__bridge WKWebsiteDataStoreRef)[[[WKWebsiteDataStore alloc] _initWithConfiguration:websiteDataStoreConfig] autorelease];
} else
m_websiteDataStore = (__bridge WKWebsiteDataStoreRef)globalWebViewConfiguration.websiteDataStore;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes