Changeset 206148 in webkit
- Timestamp:
- Sep 20, 2016 8:47:12 AM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r206144 r206148 1 2016-09-20 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 VideoControlsManager.VideoControlsManagerSingleLargeVideo fails intermittently on the Mac WK2 bot 4 https://bugs.webkit.org/show_bug.cgi?id=162255 5 6 Reviewed by Jer Noble. 7 8 This is reproducible by running the test repeatedly in a for loop (locally, I observed that running the test 9 back-to-back would result in the second one failing). This suggests that even on the runloop after the video 10 starts playing, the state of the playback controls manager may not be up to date in the UI process. Instead, we 11 can just spin the runloop until the playback controls are shown, which makes back-to-back tests to succeed and 12 will probably address flakiness on the bots for this test. 13 14 * TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm: 15 (TestWebKitAPI::TEST): 16 * TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html: 17 1 18 2016-09-20 Per Arne Vollan <pvollan@apple.com> 2 19 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm
r206135 r206148 132 132 // So the expectation is YES. 133 133 [webView loadTestPageNamed:@"large-video-with-audio"]; 134 [webView expectControlsManager:YES afterReceivingMessage:@"playing"];134 [webView waitForMediaControlsToShow]; 135 135 } 136 136 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html
r206033 r206148 2 2 <head> 3 3 <script> 4 var timeout; 5 6 function go() { 7 var video = document.getElementsByTagName('video')[0]; 8 timeout = window.setTimeout(notPlaying, 250); 9 video.addEventListener('playing', playing); 10 video.play(); 11 } 12 13 function playing() { 14 window.clearTimeout(timeout); 15 setTimeout(function() { 16 try { 17 window.webkit.messageHandlers.testHandler.postMessage('playing'); 18 } catch(e) { 19 window.location = 'callback:playing'; 20 } 21 }, 0); 22 } 23 24 function notPlaying() { 25 try { 26 window.webkit.messageHandlers.testHandler.postMessage('not playing'); 27 } catch(e) { } 4 function play() { 5 document.getElementsByTagName('video')[0].play(); 28 6 } 29 7 </script> 30 8 </head> 31 <body onload=" go()">32 <video id="test-video" src="large-video-with-audio.mp4" controlswidth=640 height=480></video>9 <body onload="play()"> 10 <video src="large-video-with-audio.mp4" width=640 height=480></video> 33 11 </body> 34 12 </html>
Note: See TracChangeset
for help on using the changeset viewer.