Title: [206148] trunk/Tools
- Revision
- 206148
- Author
- [email protected]
- Date
- 2016-09-20 08:47:12 -0700 (Tue, 20 Sep 2016)
Log Message
VideoControlsManager.VideoControlsManagerSingleLargeVideo fails intermittently on the Mac WK2 bot
https://bugs.webkit.org/show_bug.cgi?id=162255
Reviewed by Jer Noble.
This is reproducible by running the test repeatedly in a for loop (locally, I observed that running the test
back-to-back would result in the second one failing). This suggests that even on the runloop after the video
starts playing, the state of the playback controls manager may not be up to date in the UI process. Instead, we
can just spin the runloop until the playback controls are shown, which makes back-to-back tests to succeed and
will probably address flakiness on the bots for this test.
* TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (206147 => 206148)
--- trunk/Tools/ChangeLog 2016-09-20 15:45:43 UTC (rev 206147)
+++ trunk/Tools/ChangeLog 2016-09-20 15:47:12 UTC (rev 206148)
@@ -1,3 +1,20 @@
+2016-09-20 Wenson Hsieh <[email protected]>
+
+ VideoControlsManager.VideoControlsManagerSingleLargeVideo fails intermittently on the Mac WK2 bot
+ https://bugs.webkit.org/show_bug.cgi?id=162255
+
+ Reviewed by Jer Noble.
+
+ This is reproducible by running the test repeatedly in a for loop (locally, I observed that running the test
+ back-to-back would result in the second one failing). This suggests that even on the runloop after the video
+ starts playing, the state of the playback controls manager may not be up to date in the UI process. Instead, we
+ can just spin the runloop until the playback controls are shown, which makes back-to-back tests to succeed and
+ will probably address flakiness on the bots for this test.
+
+ * TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html:
+
2016-09-20 Per Arne Vollan <[email protected]>
[Win] Run layout tests in parallel.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm (206147 => 206148)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm 2016-09-20 15:45:43 UTC (rev 206147)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm 2016-09-20 15:47:12 UTC (rev 206148)
@@ -131,7 +131,7 @@
// A large video with audio should have a controls manager even if it is played via script like this video.
// So the expectation is YES.
[webView loadTestPageNamed:@"large-video-with-audio"];
- [webView expectControlsManager:YES afterReceivingMessage:@"playing"];
+ [webView waitForMediaControlsToShow];
}
TEST(VideoControlsManager, VideoControlsManagerSingleSmallVideo)
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html (206147 => 206148)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html 2016-09-20 15:45:43 UTC (rev 206147)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html 2016-09-20 15:47:12 UTC (rev 206148)
@@ -1,34 +1,12 @@
<html>
<head>
<script>
- var timeout;
-
- function go() {
- var video = document.getElementsByTagName('video')[0];
- timeout = window.setTimeout(notPlaying, 250);
- video.addEventListener('playing', playing);
- video.play();
+ function play() {
+ document.getElementsByTagName('video')[0].play();
}
-
- function playing() {
- window.clearTimeout(timeout);
- setTimeout(function() {
- try {
- window.webkit.messageHandlers.testHandler.postMessage('playing');
- } catch(e) {
- window.location = 'callback:playing';
- }
- }, 0);
- }
-
- function notPlaying() {
- try {
- window.webkit.messageHandlers.testHandler.postMessage('not playing');
- } catch(e) { }
- }
</script>
</head>
-<body _onload_="go()">
- <video id="test-video" src="" controls width=640 height=480></video>
+<body _onload_="play()">
+ <video src="" width=640 height=480></video>
</body>
</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes