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

Unified Diff: LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html

Issue 944823003: Update a cue's insertion order when reinserting it with addCue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | Source/core/html/track/TextTrack.cpp » ('j') | Source/core/html/track/TextTrack.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
diff --git a/LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html b/LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
index e6eb37ae0b760c05384c2a8835401bbb801bb8ec..c5e2c3e1427660089eb8189c2ac7afc5ed92de3b 100644
--- a/LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
+++ b/LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
@@ -26,6 +26,21 @@ 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);
« no previous file with comments | « no previous file | Source/core/html/track/TextTrack.cpp » ('j') | Source/core/html/track/TextTrack.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698