Title: [282102] trunk/Tools
Revision
282102
Author
[email protected]
Date
2021-09-07 11:29:02 -0700 (Tue, 07 Sep 2021)

Log Message

TestWebKitAPI.EventAttribution.Basic is extremely flaky on api-ios
https://bugs.webkit.org/show_bug.cgi?id=229995

Patch by Alex Christensen <[email protected]> on 2021-09-07
Reviewed by Jonathan Bedard.

Clear state on disk before running these tests.

* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::clearState):
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (282101 => 282102)


--- trunk/Tools/ChangeLog	2021-09-07 18:19:29 UTC (rev 282101)
+++ trunk/Tools/ChangeLog	2021-09-07 18:29:02 UTC (rev 282102)
@@ -1,3 +1,17 @@
+2021-09-07  Alex Christensen  <[email protected]>
+
+        TestWebKitAPI.EventAttribution.Basic is extremely flaky on api-ios
+        https://bugs.webkit.org/show_bug.cgi?id=229995
+
+        Reviewed by Jonathan Bedard.
+
+        Clear state on disk before running these tests.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+        (TestWebKitAPI::clearState):
+        (TestWebKitAPI::runBasicEventAttributionTest):
+        (TestWebKitAPI::TEST):
+
 2021-09-07  Carlos Alberto Lopez Perez  <[email protected]>
 
         [build.webkit.org][ews-build.webkit.org] Only try to download from S3 on the production server

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm (282101 => 282102)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-09-07 18:19:29 UTC (rev 282101)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-09-07 18:29:02 UTC (rev 282102)
@@ -80,8 +80,14 @@
     return [NSURL URLWithString:@"https://example.com/"];
 }
 
+static void clearState()
+{
+    [[NSFileManager defaultManager] removeItemAtURL:adoptNS([[_WKWebsiteDataStoreConfiguration alloc] init]).get()._resourceLoadStatisticsDirectory error:nil];
+}
+
 void runBasicEventAttributionTest(WKWebViewConfiguration *configuration, Function<void(WKWebView *, const HTTPServer&)>&& addAttributionToWebView)
 {
+    clearState();
     [WKWebsiteDataStore _setNetworkProcessSuspensionAllowedForTesting:NO];
     bool done = false;
     HTTPServer server([&done, connectionCount = 0] (Connection connection) mutable {
@@ -282,7 +288,7 @@
 }
 #endif
 
-TEST(EventAttribution, DISABLED_Basic)
+TEST(EventAttribution, Basic)
 {
     runBasicEventAttributionTest(nil, [](WKWebView *webView, const HTTPServer& server) {
         [webView _addEventAttributionWithSourceID:42 destinationURL:exampleURL() sourceDescription:@"test source description" purchaser:@"test purchaser" reportEndpoint:server.request().URL optionalNonce:nil];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to