Title: [243946]
Revision
243946
Author
achristen...@apple.com
Date
2019-04-05 14:50:06 -0700 (Fri, 05 Apr 2019)

Log Message

Flaky API Test TestWebKitAPI.WebKit.PerformedActionForURL
https://bugs.webkit.org/show_bug.cgi?id=196151

Reviewed by Chris Dumez.

* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
We were assuming that messages were received in a certain order.
Actually wait for all messages to be received before checking results.

Modified Paths

Diff

Modified: branches/safari-607-branch/Tools/ChangeLog (243945 => 243946)


--- branches/safari-607-branch/Tools/ChangeLog	2019-04-05 21:49:29 UTC (rev 243945)
+++ branches/safari-607-branch/Tools/ChangeLog	2019-04-05 21:50:06 UTC (rev 243946)
@@ -1,3 +1,15 @@
+2019-04-05  Alex Christensen  <achristen...@webkit.org>
+
+        Flaky API Test TestWebKitAPI.WebKit.PerformedActionForURL
+        https://bugs.webkit.org/show_bug.cgi?id=196151
+
+        Reviewed by Chris Dumez.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
+        (TEST):
+        We were assuming that messages were received in a certain order.
+        Actually wait for all messages to be received before checking results.
+
 2019-04-04  Kocsen Chung  <kocsen_ch...@apple.com>
 
         Cherry-pick r243842. rdar://problem/34841155

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm (243945 => 243946)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm	2019-04-05 21:49:29 UTC (rev 243945)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm	2019-04-05 21:50:06 UTC (rev 243946)
@@ -168,7 +168,9 @@
     [webView setUIDelegate:delegate.get()];
     [webView loadHTMLString:@"<script>fetch('notify').then(function(){fetch('block').then().catch(function(){alert('test complete')})})</script>" baseURL:[NSURL URLWithString:@"apitest:///"]];
     TestWebKitAPI::Util::run(&receivedAlert);
-    
+    while (notificationList.size() < 2)
+        TestWebKitAPI::Util::spinRunLoop();
+
     Vector<Notification> expectedNotifications {
         { "firstList", "apitest:///notify", false, false, false, { "testnotification" } },
         { "secondList", "apitest:///block", true, false, false, { } }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to