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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash.html

Issue 1879353002: 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 comment 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash.html b/third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash.html
index bf555773564c82a6043e3d8ea8b5588765683df1..5c643b043c2cc38dcd3dee686a4ba1f6b99cfe43 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash.html
@@ -1,42 +1,17 @@
<!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();
-
- consoleWrite("** Add a text track through JS to the video element **");
- var t = video.addTextTrack('captions', 'English', 'en');
-
- consoleWrite("** Add cue to the text track **");
- t.addCue(new VTTCue(0.0, 10.0, 'wow wow'));
-
- consoleWrite("** Set the track mode to showing **");
- t.mode = "showing";
-
- consoleWrite("");
- consoleWrite("No crash. PASS.");
- consoleWrite("");
-
- endTest();
- }
- </script>
- </head>
-
- <body onload="startTest()">
- <p>Tests that adding a track and changing its mode through JS doesn't crash the browser.</p>
- <video controls>
- <!-- If the src is specified through JS after the body load, the test doesn't crash anymore. -->
- <source src="../content/test.mp4" type="video/mp4">
- <source src="../content/test.ogv" type="video/ogg">
- </video>
- </body>
-</html>
+<title>Tests that adding a track and changing its mode through JS doesn't crash the browser.</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<video>
+ <!-- If the src is specified through JS after the body load, the test doesn't crash anymore. -->
+ <source src="../content/test.mp4" type="video/mp4">
+ <source src="../content/test.ogv" type="video/ogg">
+</video>
+<script>
+test(function() {
+ var video = document.querySelector('video');
+ var track = video.addTextTrack('captions', 'English', 'en');
+ track.addCue(new VTTCue(0.0, 10.0, 'wow wow'));
+ track.mode = 'showing';
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-cue-inline-assertion-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698