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

Unified Diff: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
Index: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html
diff --git a/LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html b/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html
similarity index 63%
copy from LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
copy to LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html
index cf390a5a00fb91cbc892117d38eb13feba84ddb1..da4e3a184394c8ed8e9171683729caf2983ba913 100644
--- a/LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
+++ b/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html
@@ -1,7 +1,7 @@
<!doctype html>
<title>TextTrack.addCue()</title>
-<script src=../../../../../resources/testharness.js></script>
-<script src=../../../../../resources/testharnessreport.js></script>
+<script src=../../../../../../../../resources/testharness.js></script>
+<script src=../../../../../../../../resources/testharnessreport.js></script>
<div id=log></div>
<script>
setup(function(){
@@ -26,21 +26,6 @@ test(function() {
}, document.title+', adding a cue to a track twice');
test(function() {
var t1 = video.addTextTrack('subtitles');
- var c1 = new VTTCue(0, 1, 'text1');
- t1.addCue(c1);
- assert_equals(t1.cues.length, 1, 't1.cues.length after first addition');
- assert_equals(t1.cues[0], c1, 'position of c1 in the list');
- var c2 = new VTTCue(0, 1, 'text2');
- t1.addCue(c2);
- assert_equals(t1.cues.length, 2, 't1.cues.length after second addition');
- assert_equals(t1.cues[1], c2, 'position of c2 in the list');
- t1.addCue(c1);
- assert_equals(t1.cues.length, 2, 't1.cues.length after reinserting c1');
- assert_equals(t1.cues[1], c1, 'position of c1 in the list');
- assert_equals(t1.cues[0], c2, 'position of c2 in the list');
-}, document.title+', adding a cue to a track twice when another cue has same timestamps');
-test(function() {
- var t1 = video.addTextTrack('subtitles');
var t2 = video.addTextTrack('subtitles');
var c1 = new VTTCue(0, 1, 'text1');
t1.addCue(c1);
@@ -60,13 +45,6 @@ test(function() {
t1.addCue(c1);
assert_equals(t1.cues.length, 1, 't1.cues.length after second addition');
}, document.title+', adding an associated but removed cue to the same track');
-test(function() {
- var t1 = video.addTextTrack('subtitles');
- assert_equals(t1.cues.length, 0);
- assert_throws(new TypeError, function() { t1.addCue(null); }, 'null');
- assert_throws(new TypeError, function() { t1.addCue([]); }, 'non-TextTrackCue');
- assert_equals(t1.cues.length, 0);
-}, document.title+', invalid values');
var t = async_test(document.title+', adding a cue associated with a track element to other track');
t.step(function(){
@@ -79,6 +57,9 @@ t.step(function(){
assert_equals(cue.track, t1);
t.done();
});
+ track.onerror = t.step_func(function() {
+ assert_unreached('got error event');
+ });
track.src= 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:01.000\ntest\n');
track.kind = 'subtitles';
track.track.mode = 'hidden';

Powered by Google App Engine
This is Rietveld 408576698