Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / media-document-audio-repaint.html
blobcb5f185e82f568cee911f785b667c0570c9538b0
1 <script src="../resources/run-after-layout-and-paint.js"></script>
2 <script>
3 if (window.testRunner)
4 testRunner.waitUntilDone();
6 function onPause()
8 var videoElement = document.getElementById("fr").contentDocument.querySelector("video");
9 runAfterLayoutAndPaint(function() {
10 videoElement.currentTime = videoElement.duration * 0.50;
11 });
14 function onSeeked()
16 if (window.testRunner)
17 testRunner.notifyDone();
20 function frameLoaded()
22 var videoElement = document.getElementById("fr").contentDocument.querySelector("video");
23 videoElement.addEventListener("pause", onPause, false);
24 videoElement.addEventListener("seeked", onSeeked, false);
25 // The MediaDocument has AUTOPLAY set, make sure we're paused.
26 videoElement.pause();
28 </script>
29 <p>
30 This tests that in a standalone media document with audio content, the media element repaints correctly
31 while playing.
32 </p>
33 <iframe src="content/silence.wav" id="fr" width=380 height=330 onload="frameLoaded()"></iframe>
34 <script>// To produce the same layout as before iframe was moved down to avoid rebaselines of different platforms.
35 // https://bugs.webkit.org/show_bug.cgi?id=54942
36 </script>