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..8764ed29167dcfc94b466dfad1d30779edd5afdf |
--- /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) { |
+ for (var i = 0; i < cues.length; i++) { |
+ assert_equals(cues[i].id, expected[i].id); |
+ assert_equals(cues[i].startTime, expected[i].startTime); |
+ assert_equals(cues[i].endTime, expected[i].endTime); |
+ assert_equals(cues[i].text, expected[i].text); |
+ } |
+} |