Title: [284474] trunk/Tools
Revision
284474
Author
achristen...@apple.com
Date
2021-10-19 11:54:25 -0700 (Tue, 19 Oct 2021)

Log Message

Fix iOS API tests after r284304
https://bugs.webkit.org/show_bug.cgi?id=231829

Part of the original commit that told the tests to continue doing what they were doing before was omitted.
This commits that.

* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (284473 => 284474)


--- trunk/Tools/ChangeLog	2021-10-19 18:43:20 UTC (rev 284473)
+++ trunk/Tools/ChangeLog	2021-10-19 18:54:25 UTC (rev 284474)
@@ -1,5 +1,18 @@
 2021-10-19  Alex Christensen  <achristen...@webkit.org>
 
+        Fix iOS API tests after r284304
+        https://bugs.webkit.org/show_bug.cgi?id=231829
+
+        Part of the original commit that told the tests to continue doing what they were doing before was omitted.
+        This commits that.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
+        (webViewWithResourceLoadStatisticsEnabledInNetworkProcess):
+
+2021-10-19  Alex Christensen  <achristen...@webkit.org>
+
         Use JSONValues instead of a JSC::VM to parse WKContentRuleLists
         https://bugs.webkit.org/show_bug.cgi?id=231704
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm (284473 => 284474)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-10-19 18:43:20 UTC (rev 284473)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-10-19 18:54:25 UTC (rev 284474)
@@ -355,7 +355,7 @@
 
 TEST(PrivateClickMeasurement, EphemeralWithAttributedBundleIdentifier)
 {
-    auto configuration = adoptNS([WKWebViewConfiguration new]);
+    auto configuration = configurationWithoutUsingDaemon();
     configuration.get()._attributedBundleIdentifier = @"other.test.bundle.id";
     runBasicPCMTest(configuration.get(), [](WKWebView *webView, const HTTPServer& server) {
         [webView _addEventAttributionWithSourceID:42 destinationURL:exampleURL() sourceDescription:@"test source description" purchaser:@"test purchaser" reportEndpoint:server.request().URL optionalNonce:nil applicationBundleID:@"other.test.bundle.id" ephemeral:YES];

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm (284473 => 284474)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm	2021-10-19 18:43:20 UTC (rev 284473)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm	2021-10-19 18:54:25 UTC (rev 284474)
@@ -39,10 +39,12 @@
 static RetainPtr<WKWebView> webViewWithResourceLoadStatisticsEnabledInNetworkProcess()
 {
     auto *sharedProcessPool = [WKProcessPool _sharedProcessPool];
-    auto *dataStore = [WKWebsiteDataStore defaultDataStore];
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    auto dataStoreConfiguration = adoptNS([_WKWebsiteDataStoreConfiguration new]);
+    dataStoreConfiguration.get().pcmMachServiceName = nil;
+    auto dataStore = adoptNS([[WKWebsiteDataStore alloc] _initWithConfiguration:dataStoreConfiguration.get()]);
+    auto configuration = adoptNS([WKWebViewConfiguration new]);
     [configuration setProcessPool: sharedProcessPool];
-    configuration.get().websiteDataStore = dataStore;
+    configuration.get().websiteDataStore = dataStore.get();
 
     // We need an active NetworkProcess to perform PCM operations.
     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to