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 2051233004: Convert track-webvtt-tc[024-026] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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-tc024-timestamp.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
index a377ae0628c054457dfd5bb0b4ea884d6ced089a..cd091ae788a20eb553fd91315bdd88587213cc2c 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-helpers.js
+++ b/third_party/WebKit/LayoutTests/media/track/track-helpers.js
@@ -45,6 +45,18 @@ function assert_cue_fragment(cue, children) {
assert_true(fragment.isEqualNode(cue.getCueAsHTML()));
}
+function assert_cue_fragment_text(cue, children) {
fs 2016/06/10 12:52:18 Maybe '...as_text' or '...as_textcontent'?
Srirama 2016/06/10 15:19:09 Done.
+ var fragment = createFragment(children);
+ assert_equals(cue.getCueAsHTML().textContent, fragment.textContent);
+}
+
+function assert_cue_fragment_with_style(cue, children, style) {
Srirama 2016/06/10 11:53:51 Should we merge this with "assert_cue_fragment" wi
fs 2016/06/10 12:52:18 Merging sounds like a good idea. Maybe even make i
Srirama 2016/06/10 13:57:04 "Maybe even make it so that style can more" is som
fs 2016/06/10 14:04:38 No =). 'it' refers to the (helper) function. Does
Srirama 2016/06/10 15:19:09 Understood :)
+ var fragment = createFragment(children);
+ for (var attr of Object.getOwnPropertyNames(style))
+ fragment.querySelector("span")[attr] = style[attr];
+ assert_true(fragment.isEqualNode(cue.getCueAsHTML()));
+}
+
function createFragment(children) {
var fragment = document.createDocumentFragment();
cloneChildrenToFragment(fragment, children);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-webvtt-tc024-timestamp.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698