Changeset 156699 in webkit
- Timestamp:
- Sep 30, 2013 11:12:55 PM (11 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r156698 r156699 1 2013-09-30 Alexey Proskuryakov <ap@apple.com> 2 3 Layout Test media/click-volume-bar-not-pausing.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=122126 5 6 Reviewed by Darin Adler. 7 8 Speculative partial fix. 9 10 I'm not sure if it's possible to make this test completely controlled without 11 DOMFrameContentLoaded support - we need to do work when the <video> element is 12 already present, but playback hasn't started yet. As media documents use autoplay, 13 there is a race between load and playing events. 14 15 * media/click-volume-bar-not-pausing-expected.txt: 16 * media/click-volume-bar-not-pausing.html: 17 - Add video URL after initial content fully loads to avoid races with that. 18 - Added some state logging for clarity. 19 - Only listen for "playing" event once. If playback already started, we have a 20 playing event already queued, and would add another one with pause()/play(). 21 1 22 2013-09-30 Sam White <samuel_white@apple.com> 2 23 -
trunk/LayoutTests/media/click-volume-bar-not-pausing-expected.txt
r148131 r156699 2 2 3 3 4 Video frame loaded. 4 5 EVENT(playing) 5 6 EXPECTED (mediaElement.volume == '1') OK -
trunk/LayoutTests/media/click-volume-bar-not-pausing.html
r148131 r156699 9 9 <script type="text/javascript"> 10 10 var mediaElement; 11 var skipOnFirstEmptyLoad = 0;12 11 13 12 function calculateElementCoordinates(id) … … 32 31 { 33 32 if (!window.eventSender) { 34 consoleWrite("ERROR: no event sender.");35 failTest();33 failTest("ERROR: no event sender."); 34 return; 36 35 } 37 36 … … 63 62 function frameLoaded() 64 63 { 65 if (++skipOnFirstEmptyLoad == 1) 66 return; 64 consoleWrite("Video frame loaded."); 67 65 68 66 var standaloneMediaDocument = document.getElementById("videoframe").contentDocument; 69 67 mediaElement = standaloneMediaDocument.querySelector("video"); 68 if (!mediaElement) { 69 failTest("ERROR: Video element was not found in frameLoaded()."); 70 return; 71 } 70 72 71 73 waitForEventAndFail("error"); 72 waitForEvent ('playing', playing);74 waitForEventOnce('playing', playing); 73 75 74 76 mediaElement.pause(); … … 89 91 <body> 90 92 <p>Click on volume bar on a MediaDocument does not pause.</p> 91 <iframe id="videoframe" width=380 height=330 onload="frameLoaded()"></iframe>93 <iframe id="videoframe" width=380 height=330"></iframe> 92 94 <script type="text/javascript"> 93 document.getElementById("videoframe").src = findMediaFile("video", "content/test"); 95 onload = function() { 96 var videoframe = document.getElementById("videoframe"); 97 videoframe.onload = frameLoaded; 98 videoframe.src = findMediaFile("video", "content/test"); 99 } 94 100 </script> 95 101 </body>
Note: See TracChangeset
for help on using the changeset viewer.