Bug 1307710 - wpt: Update the getCueAsHTML testcase for testing leading zero of webvtt timestamp object. r=rillian draft
authorbechen <bechen@mozilla.com>
Wed, 01 Mar 2017 16:37:50 +0800
changeset 490771 621a9d7d6974951aa7e65ab120a1a9abf4d58e80
parent 490770 9c6a813cc85fcea98c6514ccb404db4f2ea662cf
child 490772 0ca622f57e69ba058e6175c811658959c97ba593
push id47217
push userbechen@mozilla.com
push dateWed, 01 Mar 2017 08:38:28 +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>