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

Side by Side Diff: LayoutTests/media/track/track-cue-empty-crash.html

Issue 72543003: Update TextTrackCue tests to use VTTCue where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src=../media-file.js></script> 4 <script src=../media-file.js></script>
5 <script src=../video-test.js></script> 5 <script src=../video-test.js></script>
6 <script> 6 <script>
7 var fragment; 7 var fragment;
8 function startTest() 8 function startTest()
9 { 9 {
10 var emptyCue = new TextTrackCue(0, 0, ""); 10 var emptyCue = new VTTCue(0, 0, "");
11 fragment = emptyCue.getCueAsHTML(); 11 fragment = emptyCue.getCueAsHTML();
12 12
13 consoleWrite("** The getCueAsHTML() method should return a document fragment **"); 13 consoleWrite("** The getCueAsHTML() method should return a document fragment **");
14 testExpected("fragment", null, "!="); 14 testExpected("fragment", null, "!=");
15 15
16 consoleWrite("<br>** The document fragment should have one child, an empty Text node **"); 16 consoleWrite("<br>** The document fragment should have one child, an empty Text node **");
17 testExpected("fragment.childNodes.length", 1); 17 testExpected("fragment.childNodes.length", 1);
18 testExpected("fragment.childNodes[0].constructor.name", Text.name); 18 testExpected("fragment.childNodes[0].constructor.name", Text.name);
19 testExpected("fragment.childNodes[0].length", 0); 19 testExpected("fragment.childNodes[0].length", 0);
20 20
21 consoleWrite(""); 21 consoleWrite("");
22 consoleWrite("No crash. PASS."); 22 consoleWrite("No crash. PASS.");
23 consoleWrite(""); 23 consoleWrite("");
24 24
25 endTest(); 25 endTest();
26 } 26 }
27 </script> 27 </script>
28 </head> 28 </head>
29 29
30 <body onload="startTest()"> 30 <body onload="startTest()">
31 <p>Tests that having an empty cue does not crash when calling getCueAsHT ML().</p> 31 <p>Tests that having an empty cue does not crash when calling getCueAsHT ML().</p>
32 <video controls /> 32 <video controls />
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698