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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-cue-rendering-empty-cue-crash.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-empty-cue-crash.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-empty-cue-crash.html b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-empty-cue-crash.html
index d655dd1b84e2c11e248fd61754d103458f45872e..2f29c82abe8e31dd1be845d012884a07247e47f0 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-empty-cue-crash.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-empty-cue-crash.html
@@ -1,38 +1,14 @@
<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <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 having empty cues does not crash the browser.</p>
- <video controls />
- </body>
-</html>
+<title>Tests that having empty cues does not crash the browser.</title>
+<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