OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Tests the load event on HTMLTrackElement and LOADED readyState on TextTra
ck when src is set on the element.</title> |
3 <head> | 3 <video> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <track src="captions-webvtt/tc004-webvtt-file.vtt" default> |
5 | 5 </video> |
6 <script src=../media-file.js></script> | 6 <script src="../../resources/testharness.js"></script> |
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 7 <script src="../../resources/testharnessreport.js"></script> |
8 (Please avoid writing new tests using video-test.js) --> | 8 <script> |
9 <script src=../video-test.js></script> | 9 async_test(function(t) { |
10 <script> | 10 var track = document.querySelector("track"); |
11 | 11 track.onload = t.step_func_done(function() { |
12 function trackLoaded() | 12 assert_equals(track.readyState, HTMLTrackElement.LOADED); |
13 { | 13 }); |
14 consoleWrite("EVENT(load)"); | 14 }); |
15 track = document.getElementById('testTrackSrc'); | 15 </script> |
16 testExpected("track.readyState", HTMLTrackElement.LOADED); | |
17 endTest(); | |
18 } | |
19 | |
20 </script> | |
21 </head> | |
22 <body> | |
23 <p>Tests the load event on HTMLTrackElement and LOADED readyState on Tex
tTrack when src is set on the element.</p> | |
24 <video> | |
25 <track id="testTrackSrc" src="captions-webvtt/tc004-webvtt-file.vtt"
onload="trackLoaded()" default> | |
26 » </video> | |
27 </body> | |
28 </html> | |
OLD | NEW |