Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: LayoutTests/media/media-document-audio-repaint.html

Issue 196353013: Convert some repaint tests to not call display() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations, remove do-not-repaint tricky test Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/media/audio-repaint.html ('k') | LayoutTests/svg/foreignObject/filter-repaint.svg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <style>
2 body {
3 overflow: hidden
4 }
5 pre {
6 position: absolute;
7 top: 10000px;
8 }
9 </style>
10 <script src="../resources/run-after-display.js"></script>
1 <script> 11 <script>
2 if (window.testRunner) 12 if (window.testRunner)
3 testRunner.waitUntilDone(); 13 testRunner.waitUntilDone();
4 14
5 function onPause() 15 function onPause()
6 { 16 {
7 var videoElement = document.getElementById("fr").contentDocument.querySe lector("video"); 17 var videoElement = document.getElementById("fr").contentDocument.querySe lector("video");
8 if (window.testRunner) 18 window.internals.startTrackingRepaints(document);
9 testRunner.display(); 19 runAfterDisplay(function() {
10 videoElement.currentTime = videoElement.duration * 0.50; 20 videoElement.currentTime = videoElement.duration * 0.50;
21 });
11 } 22 }
12 23
13 function onSeeked() 24 function onSeeked()
14 { 25 {
26 var repaintRects = window.internals.repaintRectsAsText(document);
27 var pre = document.createElement('pre');
28 document.body.appendChild(pre);
29 pre.textContent += repaintRects;
30 window.internals.stopTrackingRepaints(document);
31
15 if (window.testRunner) 32 if (window.testRunner)
16 testRunner.notifyDone(); 33 testRunner.notifyDone();
17 } 34 }
18 35
19 function frameLoaded() 36 function frameLoaded()
20 { 37 {
21 var videoElement = document.getElementById("fr").contentDocument.querySe lector("video"); 38 var videoElement = document.getElementById("fr").contentDocument.querySe lector("video");
22 videoElement.addEventListener("pause", onPause, false); 39 videoElement.addEventListener("pause", onPause, false);
23 videoElement.addEventListener("seeked", onSeeked, false); 40 videoElement.addEventListener("seeked", onSeeked, false);
24 // The MediaDocument has AUTOPLAY set, make sure we're paused. 41 // The MediaDocument has AUTOPLAY set, make sure we're paused.
25 videoElement.pause(); 42 videoElement.pause();
26 } 43 }
27 </script> 44 </script>
28 <p> 45 <p>
29 This tests that in a standalone media document with audio content, the media element repaints correctly 46 This tests that in a standalone media document with audio content, the media element repaints correctly
30 while playing. 47 while playing.
31 </p> 48 </p>
32 <iframe src="content/silence.wav" id="fr" width=380 height=330 onload="frameLoad ed()"></iframe> 49 <iframe src="content/silence.wav" id="fr" width=380 height=330 onload="frameLoad ed()"></iframe>
33 <script>// To produce the same layout as before iframe was moved down to avoid r ebaselines of different platforms. 50 <script>// To produce the same layout as before iframe was moved down to avoid r ebaselines of different platforms.
34 // https://bugs.webkit.org/show_bug.cgi?id=54942 51 // https://bugs.webkit.org/show_bug.cgi?id=54942
35 </script> 52 </script>
OLDNEW
« no previous file with comments | « LayoutTests/media/audio-repaint.html ('k') | LayoutTests/svg/foreignObject/filter-repaint.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698