Chromium Code Reviews| 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..85f0bfdfabfde1c795ddfe84dafdbec2d0378be1 |
| --- /dev/null |
| +++ b/LayoutTests/media/track/track-cue-empty-crash.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| + |
| + <script src=../media-file.js></script> |
| + <script src=../video-test.js></script> |
| + <script> |
| + var fragment; |
| + function startTest() |
| + { |
| + var emptyCue = new TextTrackCue(0, 0, ""); |
|
acolwell GONE FROM CHROMIUM
2013/08/05 23:40:32
Should passing null also behave the same way? If s
vcarbune.chromium
2013/08/09 18:47:26
null is converted to the string "null" and further
|
| + fragment = emptyCue.getCueAsHTML(); |
| + |
| + consoleWrite("** The getCueAsHTML() method should return a document fragment **"); |
| + testExpected("fragment", null, "!="); |
| + testExpected("fragment.children.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> |