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

Unified Diff: LayoutTests/media/track/opera/interfaces/TextTrackCue/snapToLines.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/opera/interfaces/TextTrackCue/snapToLines.html
diff --git a/LayoutTests/media/track/opera/interfaces/TextTrackCue/snapToLines.html b/LayoutTests/media/track/opera/interfaces/TextTrackCue/snapToLines.html
deleted file mode 100644
index b70604dc0915242ad8d8233efed90580ccaa9caa..0000000000000000000000000000000000000000
--- a/LayoutTests/media/track/opera/interfaces/TextTrackCue/snapToLines.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!doctype html>
-<title>TextTrackCue.snapToLines</title>
-<script src=../../../../../resources/testharness.js></script>
-<script src=../../../../../resources/testharnessreport.js></script>
-<div id=log></div>
-<script>
-setup(function(){
- window.video = document.createElement('video');
- window.t1 = video.addTextTrack('subtitles');
- document.body.appendChild(video);
-});
-test(function(){
- var c1 = new TextTrackCue(0, 1, 'text1');
- assert_true(c1.snapToLines);
- c1.line = 101;
- c1.snapToLines = false;
- assert_false(c1.snapToLines);
- c1.snapToLines = true;
- assert_true(c1.snapToLines);
- c1.line = -1;
- c1.snapToLines = false;
- assert_false(c1.snapToLines);
- c1.snapToLines = true;
- assert_true(c1.snapToLines);
- c1.line = 0;
- c1.snapToLines = false;
- assert_false(c1.snapToLines);
-}, document.title+', script-created cue');
-
-var t_parsed = async_test(document.title+', parsed cue');
-t_parsed.step(function(){
- var t = document.createElement('track');
- t.onload = this.step_func(function(){
- var c1 = t.track.cues[0];
- assert_true(c1.snapToLines);
- c1.line = 101;
- c1.snapToLines = false;
- assert_false(c1.snapToLines);
- c1.snapToLines = true;
- assert_true(c1.snapToLines);
- c1.line = -1;
- c1.snapToLines = false;
- assert_false(c1.snapToLines);
- c1.snapToLines = true;
- assert_true(c1.snapToLines);
- c1.line = 0;
- c1.snapToLines = false;
- assert_false(c1.snapToLines);
-
- var c2 = t.track.cues[1];
- assert_true(c2.snapToLines);
- c2.line = 101;
- c2.snapToLines = false;
- assert_false(c2.snapToLines);
- c2.snapToLines = true;
- assert_true(c2.snapToLines);
- c2.line = -1;
- c2.snapToLines = false;
- assert_false(c2.snapToLines);
- c2.snapToLines = true;
- assert_true(c2.snapToLines);
- c2.line = 0;
- c2.snapToLines = false;
- assert_false(c2.snapToLines);
-
- var c3 = t.track.cues[2];
- assert_false(c3.snapToLines);
- c3.snapToLines = false;
- assert_false(c3.snapToLines);
- c3.snapToLines = true;
- assert_true(c3.snapToLines);
- c3.line = 101;
- c3.snapToLines = false;
- assert_false(c3.snapToLines);
- c3.snapToLines = true;
- assert_true(c3.snapToLines);
- c3.line = -1;
- c3.snapToLines = false;
- assert_false(c3.snapToLines);
- c3.snapToLines = true;
- assert_true(c3.snapToLines);
- c3.line = 0;
- c3.snapToLines = false;
- assert_false(c3.snapToLines);
-
- this.done();
- });
- t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
- '00:00:00.000 --> 00:00:00.001 line:0\ntest\n\n'+
- '00:00:00.000 --> 00:00:00.001 line:0%\ntest');
- t.track.mode = 'showing';
- video.appendChild(t);
-});
-</script>

Powered by Google App Engine
This is Rietveld 408576698