Commit b233ab4d authored by ap@apple.com's avatar ap@apple.com

Layout Test media/click-volume-bar-not-pausing.html is flaky

https://bugs.webkit.org/show_bug.cgi?id=122126

Reviewed by Darin Adler.

Speculative partial fix.

I'm not sure if it's possible to make this test completely controlled without
DOMFrameContentLoaded support - we need to do work when the <video> element is
already present, but playback hasn't started yet. As media documents use autoplay,
there is a race between load and playing events.

* media/click-volume-bar-not-pausing-expected.txt:
* media/click-volume-bar-not-pausing.html:
  - Add video URL after initial content fully loads to avoid races with that.
  - Added some state logging for clarity.
  - Only listen for "playing" event once. If playback already started, we have a
  playing event already queued, and would add another one with pause()/play().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 89c00bb1
2013-09-30 Alexey Proskuryakov <ap@apple.com>
Layout Test media/click-volume-bar-not-pausing.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=122126
Reviewed by Darin Adler.
Speculative partial fix.
I'm not sure if it's possible to make this test completely controlled without
DOMFrameContentLoaded support - we need to do work when the <video> element is
already present, but playback hasn't started yet. As media documents use autoplay,
there is a race between load and playing events.
* media/click-volume-bar-not-pausing-expected.txt:
* media/click-volume-bar-not-pausing.html:
- Add video URL after initial content fully loads to avoid races with that.
- Added some state logging for clarity.
- Only listen for "playing" event once. If playback already started, we have a
playing event already queued, and would add another one with pause()/play().
2013-09-30 Sam White <samuel_white@apple.com>
AX: Expose ARIA Busy Notifications
Click on volume bar on a MediaDocument does not pause.
Video frame loaded.
EVENT(playing)
EXPECTED (mediaElement.volume == '1') OK
EXPECTED (mediaElement.paused == 'false') OK
......
......@@ -8,7 +8,6 @@
<script src="media-controls.js"></script>
<script type="text/javascript">
var mediaElement;
var skipOnFirstEmptyLoad = 0;
function calculateElementCoordinates(id)
{
......@@ -31,8 +30,8 @@
function clickVolumeSlider()
{
if (!window.eventSender) {
consoleWrite("ERROR: no event sender.");
failTest();
failTest("ERROR: no event sender.");
return;
}
var muteButtonCoordinates;
......@@ -62,14 +61,17 @@
function frameLoaded()
{
if (++skipOnFirstEmptyLoad == 1)
return;
consoleWrite("Video frame loaded.");
var standaloneMediaDocument = document.getElementById("videoframe").contentDocument;
mediaElement = standaloneMediaDocument.querySelector("video");
if (!mediaElement) {
failTest("ERROR: Video element was not found in frameLoaded().");
return;
}
waitForEventAndFail("error");
waitForEvent('playing', playing);
waitForEventOnce('playing', playing);
mediaElement.pause();
mediaElement.play();
......@@ -88,9 +90,13 @@
</head>
<body>
<p>Click on volume bar on a MediaDocument does not pause.</p>
<iframe id="videoframe" width=380 height=330 onload="frameLoaded()"></iframe>
<iframe id="videoframe" width=380 height=330"></iframe>
<script type="text/javascript">
document.getElementById("videoframe").src = findMediaFile("video", "content/test");
onload = function() {
var videoframe = document.getElementById("videoframe");
videoframe.onload = frameLoaded;
videoframe.src = findMediaFile("video", "content/test");
}
</script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment