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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-load-from-src-readyState.html

Issue 1934913002: Convert track-load* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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 <html> 2 <title>Tests the load event on HTMLTrackElement and LOADED readyState on TextTra ck when src is set from JavaScript.</title>
3 <head> 3 <video>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <track>
5 </video>
6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
8 <script>
9 async_test(function(t) {
10 var track = document.querySelector("track");
11 assert_equals(track.readyState, HTMLTrackElement.NONE);
5 12
6 <script src=../media-file.js></script> 13 track.onload = t.step_func_done(function () {
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 14 assert_equals(track.readyState, HTMLTrackElement.LOADED);
8 (Please avoid writing new tests using video-test.js) --> 15 });
9 <script src=../video-test.js></script>
10 </head>
11 <body>
12 <p>Tests the load event on HTMLTrackElement and LOADED readyState on Tex tTrack when src is set from JavaScript.</p>
13 <video>
14 <track id="testTrackEmpty">
15 </video>
16 <script>
17 16
18 function trackLoaded() 17 track.src = "captions-webvtt/tc004-webvtt-file.vtt";
19 { 18 track.track.mode = "hidden";
20 consoleWrite("EVENT(load)"); 19 });
21 testExpected("track.readyState", HTMLTrackElement.LOADED); 20 </script>
22 endTest();
23 }
24
25 track = document.getElementById('testTrackEmpty');
26 testExpected("track.readyState", HTMLTrackElement.NONE);
27 track.addEventListener("load", function () { trackLoaded(); }, true) ;
28 track.src = "captions-webvtt/tc004-webvtt-file.vtt";
29 track.track.mode = "hidden";
30
31 </script>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698