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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-helpers.js

Issue 2012833002: Convert track-webvtt-tc[016-018] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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-webvtt-tc016-align-positioning.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function enableAllTextTracks(textTracks) { 1 function enableAllTextTracks(textTracks) {
2 for (var i = 0; i < textTracks.length; i++) { 2 for (var i = 0; i < textTracks.length; i++) {
3 var track = textTracks[i]; 3 var track = textTracks[i];
4 if (track.mode == "disabled") 4 if (track.mode == "disabled")
5 track.mode = "hidden"; 5 track.mode = "hidden";
6 } 6 }
7 } 7 }
8 8
9 function assert_cues_equal(cues, expected) { 9 function assert_cues_equal(cues, expected) {
10 assert_equals(cues.length, expected.length); 10 assert_equals(cues.length, expected.length);
11 for (var i = 0; i < cues.length; i++) { 11 for (var i = 0; i < cues.length; i++) {
12 assert_equals(cues[i].id, expected[i].id); 12 assert_equals(cues[i].id, expected[i].id);
13 assert_equals(cues[i].startTime, expected[i].startTime); 13 assert_equals(cues[i].startTime, expected[i].startTime);
14 assert_equals(cues[i].endTime, expected[i].endTime); 14 assert_equals(cues[i].endTime, expected[i].endTime);
15 assert_equals(cues[i].text, expected[i].text); 15 assert_equals(cues[i].text, expected[i].text);
16 } 16 }
17 }
18
19 function assert_cues_match(cues, expected, properties) {
20 assert_equals(cues.length, expected.length);
21 for (var i = 0; i < cues.length; i++)
22 for (var property of properties)
23 assert_equals(cues[property], expected[property]);
fs 2016/05/26 12:18:22 This needs to index in cues too. I'd suggest loadi
Srirama 2016/05/26 13:34:50 Done.
17 } 24 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698