| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <title>Test that video frame replaces poster on seeking.</title> |
| 3 <head> | 3 <script src="media-file.js"></script> |
| 4 <script src="media-file.js"></script> | 4 <script> |
| 5 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 5 function doSetup() { |
| 6 (Please avoid writing new tests using video-test.js) --> | 6 // TODO(srirama.m): convert this test to reference test. |
| 7 <script src="video-test.js"></script> | 7 var video = document.querySelector("video"); |
| 8 <script type="text/javascript" charset="utf-8"> | 8 video.src = findMediaFile("video", "content/test"); |
| 9 function doSetup() | 9 video.addEventListener("canplaythrough", function () { |
| 10 { | 10 video.currentTime = 1; // so the snapshot always has the same frame. |
| 11 findMediaElement(); | 11 }); |
| 12 video.src = findMediaFile('video', 'content/test'); | 12 testRunner.waitUntilDone(); |
| 13 video.addEventListener("canplaythrough", function () { | 13 video.addEventListener("seeked", function() { |
| 14 video.currentTime = 1; // so the snapshot always has the same f
rame. | 14 testRunner.notifyDone(); |
| 15 }); | 15 }); |
| 16 video.addEventListener("seeked", function() { | 16 } |
| 17 testExpected(video.currentTime, 1); | 17 window.addEventListener("load", doSetup, false); |
| 18 if (window.testRunner) | 18 </script> |
| 19 testRunner.notifyDone(); | |
| 20 }); | |
| 21 } | |
| 22 window.addEventListener('load', doSetup, false); | |
| 23 </script> | |
| 24 </head> | |
| 25 <body> | 19 <body> |
| 26 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34966">https://
bugs.webkit.org/show_bug.cgi?id=34966</a>. <br> | 20 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34966">https://
bugs.webkit.org/show_bug.cgi?id=34966</a>. <br> |
| 27 You should see the video below.</p> | 21 You should see the video below.</p> |
| 28 | 22 |
| 29 <video width="480" height="270" poster="content/abe.png"></video> | 23 <video width="480" height="270" poster="content/abe.png"></video> |
| 30 </body> | 24 </body> |
| 31 </html> | |
| OLD | NEW |