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

Changeset 283291 in webkit


Ignore:
Timestamp:
Sep 29, 2021, 5:57:38 PM (5 years ago)
Author:
Alan Coon
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

Location:
branches/safari-613.1.3-branch/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613.1.3-branch/Tools/ChangeLog

    r283085 r283291  
     12021-09-29  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r283172. rdar://problem/83697127
     4
     5    REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
     6    https://bugs.webkit.org/show_bug.cgi?id=230847
     7    <rdar://problem/83577251>
     8   
     9    Reviewed by Saam Barati.
     10   
     11    As identified by Saam, the promise resolution callback is racing with the stop function.
     12    To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.
     13   
     14    * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
     15    (TestWebKitAPI::TEST):
     16    * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
     17   
     18   
     19    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     20
     21    2021-09-28  Youenn Fablet  <youenn@apple.com>
     22
     23            REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
     24            https://bugs.webkit.org/show_bug.cgi?id=230847
     25            <rdar://problem/83577251>
     26
     27            Reviewed by Saam Barati.
     28
     29            As identified by Saam, the promise resolution callback is racing with the stop function.
     30            To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.
     31
     32            * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
     33            (TestWebKitAPI::TEST):
     34            * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
     35
    1362021-09-25  Lauro Moura  <lmoura@igalia.com>
    237
  • branches/safari-613.1.3-branch/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm

    r280920 r283291  
    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.