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 <b>, <i>, <u>, <rt> and <ruby> tags.</p> |
- <video> |
+ <video> |
<track src="captions-webvtt/tc023-markup.vtt" onload="trackLoaded()"> |
<track src="captions-webvtt/tc023-markup-bad.vtt" onload="trackLoaded()"> |
</video> |