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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc023-markup.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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-webvtt-tc023-markup.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc023-markup.html b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc023-markup.html
index 4574dd11d72092497df90e66996c196caa9eaa7a..9887e8ea50a995344fb81f9a33910a5e5678ca0b 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc023-markup.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc023-markup.html
@@ -3,11 +3,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src=../media-file.js></script>
+ <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
+ (Please avoid writing new tests using video-test.js) -->
<script src=../video-test.js></script>
- <script>
+ <script>
var numberOfTrackTests = 2;
-
+
function trackLoaded()
{
numberOfTracksLoaded++;
@@ -16,21 +18,21 @@
testTrackError(1);
}
}
-
+
function testTrack(i)
{
findMediaElement();
testExpected("video.textTracks[" + i + "].cues.length", "4");
-
+
var fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("The following bear is bold:\n"));
var bold = document.createElement("b");
bold.appendChild(document.createTextNode("Bear"));
fragment.appendChild(bold);
fragment.appendChild(document.createTextNode(" is Coming!!!!!"));
-
+
testExpected(fragment.isEqualNode(video.textTracks[i].cues[0].getCueAsHTML()), true);
-
+
fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("The following bear is in italics and has a class of \"larger\":\n"));
var italics = document.createElement("i");
@@ -38,7 +40,7 @@
italics.appendChild(document.createTextNode("Bear"));
fragment.appendChild(italics);
fragment.appendChild(document.createTextNode(" is Coming!!!!!"));
-
+
testExpected(fragment.isEqualNode(video.textTracks[i].cues[1].getCueAsHTML()), true);
fragment = document.createDocumentFragment();
@@ -47,9 +49,9 @@
underline.appendChild(document.createTextNode("Bear"));
fragment.appendChild(underline);
fragment.appendChild(document.createTextNode(" is coming!!!!"));
-
+
testExpected(fragment.isEqualNode(video.textTracks[i].cues[2].getCueAsHTML()), true);
-
+
fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("The following bear is ruby annotated:\nI said "));
var ruby = document.createElement("ruby");
@@ -59,7 +61,7 @@
ruby.appendChild(rt);
fragment.appendChild(ruby);
fragment.appendChild(document.createTextNode(" is coming!!!!"));
-
+
testExpected(fragment.isEqualNode(video.textTracks[i].cues[3].getCueAsHTML()), true);
allTestsEnded();
@@ -69,7 +71,7 @@
{
findMediaElement();
testExpected("video.textTracks[" + i + "].cues.length", "4");
-
+
var fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("The following bear starts bold but end is broken:\n"));
var bold = document.createElement("b");
@@ -78,15 +80,15 @@
fragment.appendChild(bold);
testExpected(fragment.isEqualNode(video.textTracks[i].cues[0].getCueAsHTML()), true);
-
+
fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("The following bear is not in italics but the markup is removed:\n"));
fragment.appendChild(document.createTextNode("Bear"));
fragment.appendChild(document.createTextNode(" is Coming!!!!!"));
testExpected(fragment.isEqualNode(video.textTracks[i].cues[1].getCueAsHTML()), true);
-
-
+
+
fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("The following bear is not underlined and markup is removed:\nI said "));
fragment.appendChild(document.createTextNode("Bear"));
@@ -101,14 +103,14 @@
fragment.appendChild(document.createTextNode(" is coming!!!!"));
testExpected(fragment.isEqualNode(video.textTracks[i].cues[3].getCueAsHTML()), true);
-
+
allTestsEnded();
}
</script>
</head>
<body onload="enableAllTextTracks()">
<p>Tests cues with &lt;b&gt;, &lt;i&gt;, &lt;u&gt;, &lt;rt&gt; and &lt;ruby&gt; tags.</p>
- <video>
+ <video>
<track src="captions-webvtt/tc023-markup.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc023-markup-bad.vtt" onload="trackLoaded()">
</video>

Powered by Google App Engine
This is Rietveld 408576698