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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-paint-invalidation.html

Issue 2295653002: Use window.testRunner in if-clause (Closed)
Patch Set: a Created 4 years, 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../fast/repaint/resources/text-based-repaint.js"></script> 2 <script src="../fast/repaint/resources/text-based-repaint.js"></script>
3 <video id="video" controls></video> 3 <video id="video" controls></video>
4 <script> 4 <script>
5 if (testRunner) 5 if (window.testRunner)
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 7
8 var video = document.getElementById("video"); 8 var video = document.getElementById("video");
9 var done = false; 9 var done = false;
10 var listener = document.addEventListener("canplaythrough", function() { 10 var listener = document.addEventListener("canplaythrough", function() {
11 if (done) 11 if (done)
12 return; 12 return;
13 done = true; 13 done = true;
14 video.currentTime = video.duration; 14 video.currentTime = video.duration;
15 runRepaintTest(); 15 runRepaintTest();
16 }, true); 16 }, true);
17 17
18 function repaintTest() { 18 function repaintTest() {
19 video.play(); 19 video.play();
20 } 20 }
21 21
22 video.src = "content/test-25fps.ogv"; 22 video.src = "content/test-25fps.ogv";
23 </script> 23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698