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'; |