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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set.html

Issue 2683633006: [WebVTT] Rename Middle to Center (Closed)
Patch Set: fix tests Created 3 years, 10 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>Test that TextTrack's cues are rendered correctly when the snap to lines flag is not set.</title> 2 <title>Test that TextTrack's cues are rendered correctly when the snap to lines flag is not set.</title>
3 <script src="../media-file.js"></script> 3 <script src="../media-file.js"></script>
4 <script src="../media-controls.js"></script> 4 <script src="../media-controls.js"></script>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <video> 7 <video>
8 <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind="captio ns" default> 8 <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind="captio ns" default>
9 </video> 9 </video>
10 <script> 10 <script>
(...skipping 18 matching lines...) Expand all
29 0.60, 29 0.60,
30 1.10, 30 1.10,
31 1.60, 31 1.60,
32 2.10, 32 2.10,
33 2.60, 33 2.60,
34 3.10, 34 3.10,
35 4.10 35 4.10
36 ]; 36 ];
37 var cueRenderingPosition = [ 37 var cueRenderingPosition = [
38 // Number of active cues 1. 38 // Number of active cues 1.
39 [[0 ,100, "middle"]], 39 [[0 ,100, "center"]],
40 [[0, 50, "middle"]], 40 [[0, 50, "center"]],
41 [[0, 0, "start"]], 41 [[0, 0, "start"]],
42 [[0, 0, "end"]], 42 [[0, 0, "end"]],
43 [[0, 100, "right"]], 43 [[0, 100, "right"]],
44 [[0, 100, "left"]], 44 [[0, 100, "left"]],
45 [[0, 50, "middle"]], 45 [[0, 50, "center"]],
46 [ //Number of active cues 7. 46 [ //Number of active cues 7.
47 [0, 50, "middle"], 47 [0, 50, "center"],
48 [0, 0, "start"], 48 [0, 0, "start"],
49 [0, 0, "end"], 49 [0, 0, "end"],
50 [0, 100, "middle"], 50 [0, 100, "center"],
51 [0, 25, "end"], 51 [0, 25, "end"],
52 [44, 33, "start"], 52 [44, 33, "start"],
53 [23, 55, "start"] 53 [23, 55, "start"]
54 ] 54 ]
55 ]; 55 ];
56 function runNextTestCase() { 56 function runNextTestCase() {
57 if (seekTimeIndex == testCaseSeekTime.length) { 57 if (seekTimeIndex == testCaseSeekTime.length) {
58 t.done(); 58 t.done();
59 return; 59 return;
60 } 60 }
(...skipping 11 matching lines...) Expand all
72 assert_equals(testTrack.track.activeCues[i].align, cuePosition[i][2] ); 72 assert_equals(testTrack.track.activeCues[i].align, cuePosition[i][2] );
73 73
74 assert_equals(Math.round(cueDisplayElement.offsetLeft / cueDisplayCo ntainer.offsetWidth * 100), cuePosition[i][0]); 74 assert_equals(Math.round(cueDisplayElement.offsetLeft / cueDisplayCo ntainer.offsetWidth * 100), cuePosition[i][0]);
75 assert_equals(Math.round(cueDisplayElement.offsetTop / cueDisplayCon tainer.offsetHeight * 100), cuePosition[i][1]); 75 assert_equals(Math.round(cueDisplayElement.offsetTop / cueDisplayCon tainer.offsetHeight * 100), cuePosition[i][1]);
76 } 76 }
77 77
78 seekTimeIndex++; 78 seekTimeIndex++;
79 runNextTestCase(); 79 runNextTestCase();
80 } 80 }
81 }); 81 });
82 </script> 82 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698