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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-cue-rendering-first-line-box.html

Issue 1887943002: Convert track tests from video-test.js to testharness.js based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698