Title: [283172] trunk/Tools
Revision
283172
Author
[email protected]
Date
2021-09-28 09:17:24 -0700 (Tue, 28 Sep 2021)

Log Message

REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
https://bugs.webkit.org/show_bug.cgi?id=230847
<rdar://problem/83577251>

Reviewed by Saam Barati.

As identified by Saam, the promise resolution callback is racing with the stop function.
To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.

* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/getUserMedia.html:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (283171 => 283172)


--- trunk/Tools/ChangeLog	2021-09-28 16:09:18 UTC (rev 283171)
+++ trunk/Tools/ChangeLog	2021-09-28 16:17:24 UTC (rev 283172)
@@ -1,3 +1,18 @@
+2021-09-28  Youenn Fablet  <[email protected]>
+
+        REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
+        https://bugs.webkit.org/show_bug.cgi?id=230847
+        <rdar://problem/83577251>
+
+        Reviewed by Saam Barati.
+
+        As identified by Saam, the promise resolution callback is racing with the stop function.
+        To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.
+
+        * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
+
 2021-09-28  Geza Lore  <[email protected]>
 
         Fix rounding issue in run-jsc-stress-tests

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm (283171 => 283172)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm	2021-09-28 16:09:18 UTC (rev 283171)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm	2021-09-28 16:17:24 UTC (rev 283172)
@@ -393,7 +393,10 @@
     [webView loadTestPageNamed:@"getUserMedia"];
     EXPECT_TRUE(waitUntilCaptureState(webView.get(), _WKMediaCaptureStateDeprecatedActiveCamera));
 
-    [delegate waitUntilPrompted];
+    int retryCount = 1000;
+    while (--retryCount && ![webView stringByEvaluatingJavaScript:@"haveStream()"].boolValue)
+        TestWebKitAPI::Util::spinRunLoop(10);
+    EXPECT_TRUE(!!retryCount);
 
     [webView stringByEvaluatingJavaScript:@"stop()"];
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to