Title: [207902] trunk/LayoutTests
- Revision
- 207902
- Author
- [email protected]
- Date
- 2016-10-26 10:43:47 -0700 (Wed, 26 Oct 2016)
Log Message
[Modern Media Controls] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=164013
Unreviewed.
Make the test more robust by only responding to "canplaythrough" once, since it might have fired again
after seeking, and registering for "seeked" events only after we've reached "canplaythrough", and accounting
for the first seek to 50s.
Patch by Antoine Quint <[email protected]> on 2016-10-26
* http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt:
* http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html:
* platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (207901 => 207902)
--- trunk/LayoutTests/ChangeLog 2016-10-26 16:46:23 UTC (rev 207901)
+++ trunk/LayoutTests/ChangeLog 2016-10-26 17:43:47 UTC (rev 207902)
@@ -1,3 +1,18 @@
+2016-10-26 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=164013
+
+ Unreviewed.
+
+ Make the test more robust by only responding to "canplaythrough" once, since it might have fired again
+ after seeking, and registering for "seeked" events only after we've reached "canplaythrough", and accounting
+ for the first seek to 50s.
+
+ * http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt:
+ * http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html:
+ * platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt: Added.
+
2016-10-26 Youenn Fablet <[email protected]>
Enable SDPProcessor for Mac bots
Modified: trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt (207901 => 207902)
--- trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt 2016-10-26 16:46:23 UTC (rev 207901)
+++ trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt 2016-10-26 17:43:47 UTC (rev 207902)
@@ -3,17 +3,14 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+Media seeked to currentTime = 50
Dispatching click event to the skip back button
+Media seeked to currentTime = 20
-seeked event was dispatched
-PASS media.currentTime is 20
-
Dispatching click event to the skip back button
+Media seeked to currentTime = 0
-seeked event was dispatched
-PASS media.currentTime is within 0.1 of 0
-
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html (207901 => 207902)
--- trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html 2016-10-26 16:46:23 UTC (rev 207901)
+++ trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html 2016-10-26 17:43:47 UTC (rev 207902)
@@ -46,37 +46,34 @@
const media = document.querySelector("video");
const mediaController = createControls(shadowRoot, media, null);
-media.addEventListener("canplaythrough", event => {
- media.currentTime = 50;
- clickSkipBackButton();
-});
-
let numberOfEvents = 0;
-media.addEventListener("seeked", function() {
- debug("");
- debug("seeked event was dispatched");
+function mediaDidSeek()
+{
+ debug("Media seeked to currentTime = " + media.currentTime);
numberOfEvents++;
-
- if (numberOfEvents == 1) {
- shouldBe("media.currentTime", "20");
- clickSkipBackButton();
- } else if (numberOfEvents == 2) {
- shouldBeCloseTo("media.currentTime", 0, 0.1);
+ if (numberOfEvents == 3) {
debug("");
shadowRoot.host.remove();
media.remove();
finishJSTest();
+ return;
}
-});
-function clickSkipBackButton()
-{
debug("");
debug("Dispatching click event to the skip back button");
mediaController.controls.skipBackButton.element.click();
}
+function mediaCanPlay()
+{
+ media.removeEventListener("canplaythrough", mediaCanPlay);
+ media.addEventListener("seeked", mediaDidSeek);
+ media.currentTime = 50;
+}
+
+media.addEventListener("canplaythrough", mediaCanPlay);
+
</script>
<script src=""
</body>
Copied: trunk/LayoutTests/platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt (from rev 207901, trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt) (0 => 207902)
--- trunk/LayoutTests/platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt 2016-10-26 17:43:47 UTC (rev 207902)
@@ -0,0 +1,17 @@
+Testing the SkipBackSupport behavior by clicking on the mute button.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Media seeked to currentTime = 50
+
+Dispatching click event to the skip back button
+Media seeked to currentTime = 20
+
+Dispatching click event to the skip back button
+Media seeked to currentTime = 0.04789115646258504
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes