[Mac iOS WK2] Layout Test http/tests/resourceLoadStatistics/ping-to-prevalent-resourc...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Apr 2019 17:28:04 +0000 (17:28 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Apr 2019 17:28:04 +0000 (17:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196974

Reviewed by Brady Eidson.

* http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html:
Make test do one thing at a time to avoid race conditions.
Clean up state on the server after test is finished to prevent corrupting future test state.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244383 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html

index ff85829..29cd78a 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-17  Alex Christensen  <achristensen@webkit.org>
+
+        [Mac iOS WK2] Layout Test http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=196974
+
+        Reviewed by Brady Eidson.
+
+        * http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html:
+        Make test do one thing at a time to avoid race conditions.
+        Clean up state on the server after test is finished to prevent corrupting future test state.
+
 2019-04-17  Zalan Bujtas  <zalan@apple.com>
 
                [iOS] Unreviewed gardening.
index 3f5fdac..d50cba3 100644 (file)
@@ -57,9 +57,9 @@
                 break;
             case "#step3":
                 // Set localhost as prevalent to put it in the blocking category.
-                document.location.hash = "step4";
                 testRunner.setStatisticsPrevalentResource(thirdPartyOrigin, true, function() {
                     testRunner.statisticsUpdateCookieBlocking(runTest);
+                    document.location.hash = "step4";
                 });
                 break;
             case "#step4":
@@ -73,7 +73,7 @@
                     openIframe(thirdPartyOrigin + "/contentextensions/resources/get-ping-data.php?test=ping-to-prevalent-resource", function() {
                         document.body.removeChild(document.getElementById("targetLink"));
                         setEnableFeature(false, function() {
-                            testRunner.notifyDone();
+                            fetch("/contentextensions/resources/delete-ping.php?test=ping-to-prevalent-resource").then(()=>{ testRunner.notifyDone(); });
                         });
                     });
                 });