| Index: LayoutTests/media/track/track-cue-empty-crash.html
|
| diff --git a/LayoutTests/media/track/track-cue-empty-crash.html b/LayoutTests/media/track/track-cue-empty-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..959e73d8f83f1f006cfbf2ce971c56cd3940dfc9
|
| --- /dev/null
|
| +++ b/LayoutTests/media/track/track-cue-empty-crash.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <script src=../media-file.js></script>
|
| + <script src=../video-test.js></script>
|
| + <script>
|
| + var fragment;
|
| + function startTest()
|
| + {
|
| + var emptyCue = new TextTrackCue(0, 0, "");
|
| + fragment = emptyCue.getCueAsHTML();
|
| +
|
| + consoleWrite("** The getCueAsHTML() method should return a document fragment **");
|
| + testExpected("fragment", null, "!=");
|
| +
|
| + consoleWrite("<br>** The document fragment should have one child, an empty Text node **");
|
| + testExpected("fragment.childNodes.length", 1);
|
| + testExpected("fragment.childNodes[0].constructor.name", Text.name);
|
| + testExpected("fragment.childNodes[0].length", 0);
|
| +
|
| + consoleWrite("");
|
| + consoleWrite("No crash. PASS.");
|
| + consoleWrite("");
|
| +
|
| + endTest();
|
| + }
|
| + </script>
|
| + </head>
|
| +
|
| + <body onload="startTest()">
|
| + <p>Tests that having an empty cue does not crash when calling getCueAsHTML().</p>
|
| + <video controls />
|
| + </body>
|
| +</html>
|
|
|