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

Unified Diff: LayoutTests/media/track/track-add-remove-cue.html

Issue 72543003: Update TextTrackCue tests to use VTTCue where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/media/track/track-add-remove-cue.html
diff --git a/LayoutTests/media/track/track-add-remove-cue.html b/LayoutTests/media/track/track-add-remove-cue.html
index 5fa8851c908eac268c11eb978d0c820c92aca527..585c7a62b621343be1f285d0c9474398e536eac6 100644
--- a/LayoutTests/media/track/track-add-remove-cue.html
+++ b/LayoutTests/media/track/track-add-remove-cue.html
@@ -23,7 +23,7 @@
testExpected("cues.getCueById('junk')", undefined);
consoleWrite("<br>*** Create a new cue, check values");
- run("textCue = new TextTrackCue(33, 3.4, 'Sausage?')");
+ run("textCue = new VTTCue(33, 3.4, 'Sausage?')");
testExpected("textCue.track", null);
testExpected("textCue.id", '');
testExpected("textCue.startTime", 33);
@@ -47,7 +47,7 @@
findMediaElement();
run('newTrack = video.addTextTrack("subtitles", "French subtitles", "fr")');
newTrack.mode = 2;
- run('newTrack.addCue(new TextTrackCue(0.0, 1.0, "Test!"))');
+ run('newTrack.addCue(new VTTCue(0.0, 1.0, "Test!"))');
run('newCue = newTrack.cues[0]');
testExpected("newCue.track", newTrack);
testExpected("newCue.id", "");
@@ -62,7 +62,7 @@
testExpected("newCue.align", "middle");
consoleWrite("<br>*** Create an old-style cue with an id.");
- run("oldStyleCue = new TextTrackCue('sausage-cue', 33, 3.4, 'Sausage?')");
+ run("oldStyleCue = new VTTCue('sausage-cue', 33, 3.4, 'Sausage?')");
testExpected("oldStyleCue.id", "");
testExpected("oldStyleCue.startTime.toString()", "NaN");
testExpected("oldStyleCue.endTime", 33);
@@ -88,7 +88,7 @@
testDOMException("testTrack.track.removeCue(textCue)", "DOMException.NOT_FOUND_ERR");
consoleWrite("<br>*** Add a cue before all the existing cues.");
- run("testTrack.track.addCue(new TextTrackCue(0, 31, 'I am first'))");
+ run("testTrack.track.addCue(new VTTCue(0, 31, 'I am first'))");
testExpected("cues[0].startTime", 0);
testExpected("cues[0].endTime", 31);
testExpected("cues[1].startTime", 0);
@@ -100,7 +100,7 @@
</script>
</head>
<body>
- <p>Tests TextTrackCue's addCue and removeCue</p>
+ <p>Tests TextTrack's addCue and removeCue</p>
<video>
<track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind="captions" onload="trackLoaded()" default>
</video>

Powered by Google App Engine
This is Rietveld 408576698