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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Tests that adding a track and changing its mode through JS doesn't crash the browser.</title>
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <script src="../../resources/testharnessreport.js"></script>
5 5 <video>
6 <script src=../media-file.js></script> 6 <!-- If the src is specified through JS after the body load, the test doesn' t crash anymore. -->
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 7 <source src="../content/test.mp4" type="video/mp4">
8 (Please avoid writing new tests using video-test.js) --> 8 <source src="../content/test.ogv" type="video/ogg">
9 <script src=../video-test.js></script> 9 </video>
10 10 <script>
11 <script> 11 test(function() {
12 function startTest() 12 var video = document.querySelector('video');
13 { 13 var track = video.addTextTrack('captions', 'English', 'en');
14 findMediaElement(); 14 track.addCue(new VTTCue(0.0, 10.0, 'wow wow'));
15 15 track.mode = 'showing';
16 consoleWrite("** Add a text track through JS to the video element ** "); 16 });
17 var t = video.addTextTrack('captions', 'English', 'en'); 17 </script>
18
19 consoleWrite("** Add cue to the text track **");
20 t.addCue(new VTTCue(0.0, 10.0, 'wow wow'));
21
22 consoleWrite("** Set the track mode to showing **");
23 t.mode = "showing";
24
25 consoleWrite("");
26 consoleWrite("No crash. PASS.");
27 consoleWrite("");
28
29 endTest();
30 }
31 </script>
32 </head>
33
34 <body onload="startTest()">
35 <p>Tests that adding a track and changing its mode through JS doesn't cr ash the browser.</p>
36 <video controls>
37 <!-- If the src is specified through JS after the body load, the tes t doesn't crash anymore. -->
38 <source src="../content/test.mp4" type="video/mp4">
39 <source src="../content/test.ogv" type="video/ogg">
40 </video>
41 </body>
42 </html>
OLDNEW
« 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