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

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

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: make single reference function anonymous 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
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
index 0e5db69461f06b2ae6e8442795cb30ee5599718f..26a0698d234d6095c91d7bc745f74f152428a62f 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-helpers.js
+++ b/third_party/WebKit/LayoutTests/media/track/track-helpers.js
@@ -24,4 +24,18 @@ function assert_cues_match(cues, expected, properties) {
for (var property of properties)
foolip 2016/06/02 09:14:18 Is the properties array really needed? Can't this
fs 2016/06/02 09:32:46 Yes, that ought to work (with s/expected/expectedI
Srirama 2016/06/02 09:59:27 Done.
assert_equals(cue[property], expectedItem[property]);
}
+}
+
+function check_cues_from_track(src, func) {
+ async_test(function(t) {
+ var video = document.createElement("video");
+ var trackElement = document.createElement("track");
+ trackElement.src = src;
+ trackElement.default = true;
+ video.appendChild(trackElement);
+
+ trackElement.onload = t.step_func_done(function() {
+ func(trackElement.track);
+ });
+ }, "Check cues from " + src);
}

Powered by Google App Engine
This is Rietveld 408576698