Bug 1307710 - wpt: Update the getCueAsHTML testcase for testing leading zero of webvtt timestamp object. r=rillian draft
authorbechen <bechen@mozilla.com>
Fri, 03 Mar 2017 11:34:58 +0800
changeset 492718 56fee1d0bb19712a16dd9dfca534cd297e2a0b6d
parent 492717 b3389f2ea24e0b4a366ef3c78be15f3d96edadc5
child 492719 dfcef6b6c680ff01a3aa9af2cf7430d1a419106e
push id47615
push userbechen@mozilla.com
push dateFri, 03 Mar 2017 03:37:41 +0000
reviewersrillian
bugs1307710
milestone54.0a1
Bug 1307710 - wpt: Update the getCueAsHTML testcase for testing leading zero of webvtt timestamp object. r=rillian MozReview-Commit-ID: BQPugEkRCP0
testing/web-platform/tests/webvtt/webvtt-api-for-browsers/vttcue-interface/getCueAsHTML.html
--- a/testing/web-platform/tests/webvtt/webvtt-api-for-browsers/vttcue-interface/getCueAsHTML.html
+++ b/testing/web-platform/tests/webvtt/webvtt-api-for-browsers/vttcue-interface/getCueAsHTML.html
@@ -3,17 +3,17 @@
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <div id=log></div>
 <script>
 test(function(){
     var video = document.createElement('video');
     var t1 = video.addTextTrack('subtitles');
     document.body.appendChild(video);
-    var c1 = new VTTCue(0, 1, '<c></c><c.a.b></c><i></i><b></b><u></u><ruby><rt></rt></ruby><v></v><v a b></v><00:00:00.500>x\0');
+    var c1 = new VTTCue(0, 1, '<c></c><c.a.b></c><i></i><b></b><u></u><ruby><rt></rt></ruby><v></v><v a b></v><1:00:00.500>x\0');
     t1.addCue(c1);
     window.frag = c1.getCueAsHTML();
     assert_equals(frag.childNodes.length, 10, 'childNodes.length');
     assert_true(frag instanceof DocumentFragment, 'getCueAsHTML() should return DocumentFragment');
 }, document.title+', creating the cue');
 test(function(){
     assert_equals(frag.childNodes[0].namespaceURI, 'http://www.w3.org/1999/xhtml', 'namespaceURI');
     assert_equals(frag.childNodes[0].localName, 'span', 'localName');
@@ -77,16 +77,16 @@ test(function(){
     assert_equals(frag.childNodes[7].localName, 'span', 'localName');
     assert_equals(frag.childNodes[7].attributes.length, 1, 'attributes');
     assert_equals(frag.childNodes[7].getAttributeNS('', 'title'), 'a b', 'title attribute');
     assert_false(frag.childNodes[7].hasChildNodes(), 'hasChildNodes()');
     assert_true(frag.childNodes[7] instanceof HTMLElement, 'instanceof');
 }, document.title+', <v a b>');
 test(function(){
     assert_equals(frag.childNodes[8].target, 'timestamp', 'target');
-    assert_equals(frag.childNodes[8].data, '00:00:00.500', 'data');
+    assert_equals(frag.childNodes[8].data, '01:00:00.500', 'data');
     assert_true(frag.childNodes[8] instanceof ProcessingInstruction, 'instanceof');
-}, document.title+', <00:00:00.500>');
+}, document.title+', <1:00:00.500>');
 test(function(){
     assert_equals(frag.childNodes[9].data, 'x\0', 'data');
     assert_true(frag.childNodes[9] instanceof Text, 'instanceof');
 }, document.title+', x\\0');
 </script>