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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html

Issue 2029663002: Convert track-webvtt-tc[019-021] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Tests cue text position and alignment from settings.</title> 2 <title>Tests cue text position and alignment from settings.</title>
3 <script src="track-helpers.js"></script> 3 <script src="track-helpers.js"></script>
4 <script src="../../resources/testharness.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <video> 6 <video>
7 <track src="captions-webvtt/tc016-align-positioning.vtt"> 7 <track src="captions-webvtt/tc016-align-positioning.vtt">
8 <track src="captions-webvtt/tc016-align-positioning-bad.vtt"> 8 <track src="captions-webvtt/tc016-align-positioning-bad.vtt">
9 </video> 9 </video>
10 <script> 10 <script>
(...skipping 17 matching lines...) Expand all
28 testTrackError(1); 28 testTrackError(1);
29 t.done(); 29 t.done();
30 } 30 }
31 31
32 function testTrack(index) { 32 function testTrack(index) {
33 var expected = [ 33 var expected = [
34 { position : 10, align : "start" }, 34 { position : 10, align : "start" },
35 { position : 20, align : "middle" }, 35 { position : 20, align : "middle" },
36 { position : 80, align : "end" } 36 { position : 80, align : "end" }
37 ]; 37 ];
38 var properties = [ "position", "align" ];
39 38
40 assert_cues_match(video.textTracks[index].cues, expected, properties); 39 assert_cues_match(video.textTracks[index].cues, expected);
41 } 40 }
42 41
43 function testTrackError(index) { 42 function testTrackError(index) {
44 var expected = [ 43 var expected = [
45 { position : 10, align : "middle" }, 44 { position : 10, align : "middle" },
46 { position : "auto", align : "middle" }, 45 { position : "auto", align : "middle" },
47 { position : "auto", align : "middle" } 46 { position : "auto", align : "middle" }
48 ]; 47 ];
49 var properties = [ "position", "align" ];
50 48
51 assert_cues_match(video.textTracks[index].cues, expected, properties); 49 assert_cues_match(video.textTracks[index].cues, expected);
52 } 50 }
53 }); 51 });
54 </script> 52 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698