Index: third_party/WebKit/LayoutTests/media/track/track-cue-rendering-first-line-box.html |
diff --git a/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-first-line-box.html b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-first-line-box.html |
index 8196deece6ab3ca5ff9a095a2044b66ba85ee52a..cd865158a50e3f51669dcfe47efc281b47e502f9 100644 |
--- a/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-first-line-box.html |
+++ b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-first-line-box.html |
@@ -1,42 +1,17 @@ |
<!DOCTYPE html> |
-<html> |
- <head> |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
- |
- <style> |
- -webkit-media-text-track-display { display: block; } |
- </style> |
- |
- <script src=../media-file.js></script> |
- <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
- (Please avoid writing new tests using video-test.js) --> |
- <script src=../video-test.js></script> |
- <script> |
- function startTest() |
- { |
- findMediaElement(); |
- video.src = findMediaFile('video', '../content/test'); |
- |
- consoleWrite("** Add a text track to the video element **"); |
- video.addTextTrack("captions", "regular captions track", "en"); |
- |
- consoleWrite("** Add an empty cue to the track **"); |
- video.textTracks[0].addCue(new VTTCue(0.00, 4.00, "")); |
- |
- consoleWrite("** Play the video and render the cue **"); |
- video.play(); |
- |
- consoleWrite(""); |
- consoleWrite("No crash. PASS."); |
- consoleWrite(""); |
- |
- endTest(); |
- } |
- </script> |
- </head> |
- |
- <body onload="startTest()"> |
- <p>Tests that setting display to block does not crash the browser.</p> |
- <video controls /> |
- </body> |
-</html> |
+<title>Tests that setting display to block does not crash the browser.</title> |
+<style> |
+-webkit-media-text-track-display { display: block; } |
+</style> |
+<script src="../media-file.js"></script> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+test(function() { |
+ var video = document.createElement("video"); |
+ video.src = findMediaFile("video", "../content/test"); |
+ video.addTextTrack("captions", "regular captions track", "en"); |
+ video.textTracks[0].addCue(new VTTCue(0, 4, "")); |
+ video.play(); |
+}); |
+</script> |