Bug 1320276 - Fix web-platform-tests/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html. r=rillian
authorAlastor Wu <alwu@mozilla.com>
Fri, 25 Nov 2016 16:59:57 +0800
changeset 324302 fd10f23e5aa3273ebff5d021c1db3f10c2a39c36
parent 324301 f59cc2c8a18067f8410d267aae8fe3560b744835
child 324303 f0ee3f97917cae253288354e06ce7a4b109651c8
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersrillian
bugs1320276
milestone53.0a1
Bug 1320276 - Fix web-platform-tests/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html. r=rillian Modify the test "web-platform-tests/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html" in order to follow the spec. (1) The default value of line should be "auto" [1] - change all "-1" into "auto" (2) The cue.line should return the line's value, instead of computedLine's [2] - change "-2" into "auto" (-2 is the value of the computedLine) [1] https://w3c.github.io/webvtt/#webvtt-cue-line [2] https://w3c.github.io/webvtt/#dom-vttcue-line MozReview-Commit-ID: BbClRlWwQ40
testing/web-platform/meta/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html.ini
testing/web-platform/tests/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html
deleted file mode 100644
--- a/testing/web-platform/meta/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[line.html]
-  type: testharness
-  [VTTCue.line, script-created cue]
-    expected: FAIL
-
-  [VTTCue.line, parsed cue]
-    expected: FAIL
-
--- a/testing/web-platform/tests/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html
+++ b/testing/web-platform/tests/webvtt/webvtt-api-for-browsers/vttcue-interface/line.html
@@ -3,53 +3,53 @@
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <div id=log></div>
 <script>
 test(function(){
     var video = document.createElement('video');
     document.body.appendChild(video);
     var c1 = new VTTCue(0, 1, 'text1');
-    assert_equals(c1.line, -1);
+    assert_equals(c1.line, "auto");
     var track = document.createElement('track');
     var t = track.track;
     t.addCue(c1);
-    assert_equals(c1.line, -1);
+    assert_equals(c1.line, "auto");
     video.appendChild(track);
-    assert_equals(c1.line, -1);
+    assert_equals(c1.line, "auto");
     t.mode = 'showing';
-    assert_equals(c1.line, -1);
+    assert_equals(c1.line, "auto");
     var c2 = new VTTCue(0, 1, 'text2');
     var track2 = document.createElement('track');
     var t2 = track2.track;
     t2.addCue(c2);
-    assert_equals(c2.line, -1);
+    assert_equals(c2.line, "auto");
     video.appendChild(track2);
     t2.mode = 'showing';
-    assert_equals(c2.line, -2);
-    assert_equals(c1.line, -1);
+    assert_equals(c2.line, "auto");
+    assert_equals(c1.line, "auto");
     c1.line = -5;
     assert_equals(c1.line, -5);
-    assert_equals(c2.line, -2);
+    assert_equals(c2.line, "auto");
     c1.line = 0;
     c1.snapToLines = false;
     assert_equals(c1.line, 0);
-    assert_equals(c2.line, -2);
+    assert_equals(c2.line, "auto");
 }, document.title+', script-created cue');
 
 var t_parsed = async_test(document.title+', parsed cue');
 t_parsed.step(function(){
     var video = document.createElement('video');
     document.body.appendChild(video);
     var t = document.createElement('track');
     t.onload = this.step_func(function(){
         var c1 = t.track.cues[0];
         var c2 = t.track.cues[1];
         var c3 = t.track.cues[2];
-        assert_equals(c1.line, -1);
+        assert_equals(c1.line, "auto");
         assert_equals(c2.line, 0);
         assert_equals(c3.line, 0);
 
         this.done();
     });
     t.onerror = this.step_func(function() {
       assert_unreached('got error event');
     });