⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283172 in webkit


Ignore:
Timestamp:
Sep 28, 2021, 9:17:24 AM (5 years ago)
Author:
youenn@apple.com
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:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r283164 r283172  
     12021-09-28  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=230847
     5        <rdar://problem/83577251>
     6
     7        Reviewed by Saam Barati.
     8
     9        As identified by Saam, the promise resolution callback is racing with the stop function.
     10        To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.
     11
     12        * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
     13        (TestWebKitAPI::TEST):
     14        * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
     15
    1162021-09-28  Geza Lore  <gezalore@gmail.com>
    217
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm

    r280920 r283172  
    394394    EXPECT_TRUE(waitUntilCaptureState(webView.get(), _WKMediaCaptureStateDeprecatedActiveCamera));
    395395
    396     [delegate waitUntilPrompted];
     396    int retryCount = 1000;
     397    while (--retryCount && ![webView stringByEvaluatingJavaScript:@"haveStream()"].boolValue)
     398        TestWebKitAPI::Util::spinRunLoop(10);
     399    EXPECT_TRUE(!!retryCount);
    397400
    398401    [webView stringByEvaluatingJavaScript:@"stop()"];
Note: See TracChangeset for help on using the changeset viewer.