Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
|
Julien - ping for review
2013/08/09 20:12:12
Usually meta tags are removed unless useful for th
| |
| 5 | |
| 6 <script src=../media-file.js></script> | |
| 7 <script src=../video-test.js></script> | |
| 8 <script> | |
| 9 var fragment; | |
| 10 function startTest() | |
| 11 { | |
| 12 var emptyCue = new TextTrackCue(0, 0, ""); | |
| 13 fragment = emptyCue.getCueAsHTML(); | |
| 14 | |
| 15 consoleWrite("** The getCueAsHTML() method should return a document fragment **"); | |
| 16 testExpected("fragment", null, "!="); | |
| 17 | |
| 18 consoleWrite("<br>** The document fragment should have one child, an empty Text node **"); | |
| 19 testExpected("fragment.childNodes.length", 1); | |
| 20 testExpected("fragment.childNodes[0].constructor.name", Text.name); | |
| 21 testExpected("fragment.childNodes[0].length", 0); | |
| 22 | |
| 23 consoleWrite(""); | |
| 24 consoleWrite("No crash. PASS."); | |
| 25 consoleWrite(""); | |
| 26 | |
| 27 endTest(); | |
| 28 } | |
| 29 </script> | |
| 30 </head> | |
| 31 | |
| 32 <body onload="startTest()"> | |
| 33 <p>Tests that having an empty cue does not crash when calling getCueAsHT ML().</p> | |
| 34 <video controls /> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |