Changeset 207902 in webkit
- Timestamp:
- Oct 26, 2016 10:43:47 AM (8 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 added
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207901 r207902 1 2016-10-26 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=164013 5 6 Unreviewed. 7 8 Make the test more robust by only responding to "canplaythrough" once, since it might have fired again 9 after seeking, and registering for "seeked" events only after we've reached "canplaythrough", and accounting 10 for the first seek to 50s. 11 12 * http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt: 13 * http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html: 14 * platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt: Added. 15 1 16 2016-10-26 Youenn Fablet <youenn@apple.com> 2 17 -
trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt
r207835 r207902 4 4 5 5 6 Media seeked to currentTime = 50 6 7 7 8 Dispatching click event to the skip back button 8 9 seeked event was dispatched 10 PASS media.currentTime is 20 9 Media seeked to currentTime = 20 11 10 12 11 Dispatching click event to the skip back button 13 14 seeked event was dispatched 15 PASS media.currentTime is within 0.1 of 0 12 Media seeked to currentTime = 0 16 13 17 14 PASS successfullyParsed is true -
trunk/LayoutTests/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html
r207835 r207902 47 47 const mediaController = createControls(shadowRoot, media, null); 48 48 49 media.addEventListener("canplaythrough", event => {50 media.currentTime = 50;51 clickSkipBackButton();52 });53 54 49 let numberOfEvents = 0; 55 media.addEventListener("seeked", function() { 56 debug(""); 57 debug(" seeked event was dispatched");50 function mediaDidSeek() 51 { 52 debug("Media seeked to currentTime = " + media.currentTime); 58 53 59 54 numberOfEvents++; 60 61 if (numberOfEvents == 1) { 62 shouldBe("media.currentTime", "20"); 63 clickSkipBackButton(); 64 } else if (numberOfEvents == 2) { 65 shouldBeCloseTo("media.currentTime", 0, 0.1); 55 if (numberOfEvents == 3) { 66 56 debug(""); 67 57 shadowRoot.host.remove(); 68 58 media.remove(); 69 59 finishJSTest(); 60 return; 70 61 } 71 });72 62 73 function clickSkipBackButton()74 {75 63 debug(""); 76 64 debug("Dispatching click event to the skip back button"); … … 78 66 } 79 67 68 function mediaCanPlay() 69 { 70 media.removeEventListener("canplaythrough", mediaCanPlay); 71 media.addEventListener("seeked", mediaDidSeek); 72 media.currentTime = 50; 73 } 74 75 media.addEventListener("canplaythrough", mediaCanPlay); 76 80 77 </script> 81 78 <script src="../../../../../resources/js-test-post.js"></script> -
trunk/LayoutTests/platform/mac-yosemite/http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click-expected.txt
r207901 r207902 4 4 5 5 6 Media seeked to currentTime = 50 6 7 7 8 Dispatching click event to the skip back button 8 9 seeked event was dispatched 10 PASS media.currentTime is 20 9 Media seeked to currentTime = 20 11 10 12 11 Dispatching click event to the skip back button 13 14 seeked event was dispatched 15 PASS media.currentTime is within 0.1 of 0 12 Media seeked to currentTime = 0.04789115646258504 16 13 17 14 PASS successfullyParsed is true
Note: See TracChangeset
for help on using the changeset viewer.