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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-id.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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 <html>
3 <head> 3 <head>
4 4
5 <script src=../media-file.js></script> 5 <script src=../media-file.js></script>
6 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
7 (Please avoid writing new tests using video-test.js) -->
6 <script src=../video-test.js></script> 8 <script src=../video-test.js></script>
7 <script> 9 <script>
8 10
9 var textTrack; 11 var textTrack;
10 12
11 function start() 13 function start()
12 { 14 {
13 findMediaElement(); 15 findMediaElement();
14 consoleWrite(""); 16 consoleWrite("");
15 17
16 textTrack = document.getElementById("LoremIpsum").track; 18 textTrack = document.getElementById("LoremIpsum").track;
17 19
18 consoleWrite("<b>++ Test default attribute value</b>"); 20 consoleWrite("<b>++ Test default attribute value</b>");
19 testExpected("textTrack.id", "LoremIpsum"); 21 testExpected("textTrack.id", "LoremIpsum");
20 testExpected("video.textTracks[0].id", "LoremIpsum"); 22 testExpected("video.textTracks[0].id", "LoremIpsum");
21 consoleWrite(""); 23 consoleWrite("");
22 24
23 consoleWrite("<b>++ Make sure we can look tracks up by id</b>"); 25 consoleWrite("<b>++ Make sure we can look tracks up by id</b>");
24 testExpected("video.textTracks.getTrackById('LoremIpsum')", text Track); 26 testExpected("video.textTracks.getTrackById('LoremIpsum')", text Track);
25 consoleWrite(""); 27 consoleWrite("");
26 28
27 consoleWrite("<b>++ Test that it's readonly</b>"); 29 consoleWrite("<b>++ Test that it's readonly</b>");
28 run("textTrack.id = 'newvalue';"); 30 run("textTrack.id = 'newvalue';");
29 testExpected("textTrack.id", "LoremIpsum"); 31 testExpected("textTrack.id", "LoremIpsum");
30 32
31 endTest(); 33 endTest();
32 } 34 }
33 35
34 </script> 36 </script>
35 </head> 37 </head>
36 <body > 38 <body >
37 <p>Tests that the TextTrack "id" attribute is appropriately set.</p> 39 <p>Tests that the TextTrack "id" attribute is appropriately set.</p>
38 <video> 40 <video>
39 <track id="LoremIpsum" src="captions-webvtt/captions-fast.vtt" onloa d="start()" default> 41 <track id="LoremIpsum" src="captions-webvtt/captions-fast.vtt" onloa d="start()" default>
40 </video> 42 </video>
41 </body> 43 </body>
42 </html> 44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698