Title: [283291] branches/safari-613.1.3-branch/Tools
Revision
283291
Author
[email protected]
Date
2021-09-29 17:57:38 -0700 (Wed, 29 Sep 2021)

Log Message

Cherry-pick r283172. rdar://problem/83697127

    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:

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

Modified Paths

Diff

Modified: branches/safari-613.1.3-branch/Tools/ChangeLog (283290 => 283291)


--- branches/safari-613.1.3-branch/Tools/ChangeLog	2021-09-30 00:57:35 UTC (rev 283290)
+++ branches/safari-613.1.3-branch/Tools/ChangeLog	2021-09-30 00:57:38 UTC (rev 283291)
@@ -1,3 +1,38 @@
+2021-09-29  Alan Coon  <[email protected]>
+
+        Cherry-pick r283172. rdar://problem/83697127
+
+    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:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-25  Lauro Moura  <[email protected]>
 
         [GLIB] Use less parallel webviews in the uri-scheme API test for WPE and debug builds

Modified: branches/safari-613.1.3-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm (283290 => 283291)


--- branches/safari-613.1.3-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm	2021-09-30 00:57:35 UTC (rev 283290)
+++ branches/safari-613.1.3-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm	2021-09-30 00:57:38 UTC (rev 283291)
@@ -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