REGRESSION (r234081): TestWebKitAPI.VideoControlsManager.VideoControlsManagerAudioEle...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Sep 2018 17:01:55 +0000 (17:01 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Sep 2018 17:01:55 +0000 (17:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187972
<rdar://problem/42667737>

Reviewed by Darin Adler.

Ensure that listeners are added in time to catch messages broadcast at them.

* TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):

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

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm

index 716c8e8..cbc5c89 100644 (file)
@@ -1,3 +1,16 @@
+2018-09-04  Jer Noble  <jer.noble@apple.com>
+
+        REGRESSION (r234081): TestWebKitAPI.VideoControlsManager.VideoControlsManagerAudioElementFollowingUserInteraction is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=187972
+        <rdar://problem/42667737>
+
+        Reviewed by Darin Adler.
+
+        Ensure that listeners are added in time to catch messages broadcast at them.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
+        (TestWebKitAPI::TEST):
+
 2018-09-04  Ross Kirsling  <ross.kirsling@sony.com>
 
         Update googletest
index c6dc009..cf1fba6 100644 (file)
@@ -333,7 +333,6 @@ TEST(VideoControlsManager, VideoControlsManagerAudioElementFollowingUserInteract
 
     [webView loadTestPageNamed:@"play-audio-on-click"];
     [webView waitForPageToLoadWithAutoplayingVideos:0];
-    [webView mouseDownAtPoint:NSMakePoint(200, 200) simulatePressure:YES];
 
     [webView performAfterReceivingMessage:@"playing-first" action:^ {
         [webView evaluateJavaScript:@"seekToEnd()" completionHandler:nil];
@@ -343,6 +342,9 @@ TEST(VideoControlsManager, VideoControlsManagerAudioElementFollowingUserInteract
     [webView performAfterReceivingMessage:@"playing-second" action:^ {
         secondAudioPlaying = true;
     }];
+
+    [webView mouseDownAtPoint:NSMakePoint(200, 200) simulatePressure:YES];
+
     TestWebKitAPI::Util::run(&secondAudioPlaying);
     while ([[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]) {
         if ([webView _hasActiveVideoForControlsManager] && [[webView controlledElementID] isEqualToString:@"second"])