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

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

Issue 1956213002: Convert track-webvtt-tc[000-002] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add track-helpers.js utility file 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 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-webvtt-tc000-empty.html » ('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-helpers.js
diff --git a/third_party/WebKit/LayoutTests/media/track/track-helpers.js b/third_party/WebKit/LayoutTests/media/track/track-helpers.js
new file mode 100644
index 0000000000000000000000000000000000000000..d45cd6aa987a6b810a5a21b5e0f229820f7e003d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/track/track-helpers.js
@@ -0,0 +1,16 @@
+function enableAllTextTracks(textTracks) {
+ for (var i = 0; i < textTracks.length; i++) {
+ var track = textTracks[i];
+ if (track.mode == "disabled")
+ track.mode = "hidden";
+ }
+}
+
+function assert_cues_equal(cues, expected) {
mlamouri (slow - plz ping) 2016/05/19 11:40:31 Can you change `expected` to be an array of Object
Srirama 2016/05/19 13:59:36 Done.
+ for (var i = 0; i < cues.length; i++) {
+ assert_equals(cues[i].id, expected.idValues[i]);
+ assert_equals(cues[i].startTime, expected.startTimeValues[i]);
+ assert_equals(cues[i].endTime, expected.endTimeValues[i]);
+ assert_equals(cues[i].text, expected.textValues[i]);
+ }
+}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698