diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/webvtt/webvtt-file-format-parsing | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/webvtt/webvtt-file-format-parsing')
47 files changed, 1603 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/buildtests.py b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/buildtests.py new file mode 100644 index 000000000..5ad788bc0 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/buildtests.py @@ -0,0 +1,67 @@ +#!/usr/bin/python + +import os +import urllib +import hashlib + +doctmpl = """<!doctype html> +<title>WebVTT cue data parser test %s</title> +<style>video { display:none }</style> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/html/syntax/parsing/template.js></script> +<script src=/html/syntax/parsing/common.js></script> +<script src=../common.js></script> +<div id=log></div> +<script> +runTests([ +%s +]); +</script>""" + +testobj = "{name:'%s', input:'%s', expected:'%s'}" + +def appendtest(tests, input, expected): + tests.append(testobj % (hashlib.sha1(input).hexdigest(), urllib.quote(input[:-1]), urllib.quote(expected[:-1]))) + +files = os.listdir('dat/') +for file in files: + if os.path.isdir('dat/'+file) or file[0] == ".": + continue + tests = [] + input = "" + expected = "" + state = "" + f = open('dat/'+file, "r") + while 1: + line = f.readline() + if not line: + if state != "": + appendtest(tests, input, expected) + input = "" + expected = "" + state = "" + break + if line[0] == "#": + state = line + if line == "#document-fragment\n": + expected = expected + line + elif state == "#data\n": + input = input + line + elif state == "#errors\n": + pass + elif state == "#document-fragment\n": + if line == "\n": + appendtest(tests, input, expected) + input = "" + expected = "" + state = "" + else: + expected = expected + line + else: + raise Exception("failed to parse file "+file+" line:"+line+" (state: "+state+")") + f.close() + barename = file.replace(".dat", "") + out = open('tests/'+barename+".html", "w") + out.write(doctmpl % (barename, ",\n".join(tests))) + out.close() diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/common.js b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/common.js new file mode 100644 index 000000000..543fe4655 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/common.js @@ -0,0 +1,189 @@ +var namespaces = { + "html":"http://www.w3.org/1999/xhtml", + "mathml":"http://www.w3.org/1998/Math/MathML", + "svg":"http://www.w3.org/2000/svg", + "xlink":"http://www.w3.org/1999/xlink", + "xml":"http://www.w3.org/XML/1998/namespace", + "xmlns":"http://www.w3.org/2000/xmlns/" +}; + +var prefixes = {}; +for (var prefix in namespaces) { + if (namespaces.hasOwnProperty(prefix)) { + prefixes[namespaces[prefix]] = prefix; + } +} +prefixes[namespaces["mathml"]] = "math"; + +function format(format_string) { + var insertions = Array.prototype.slice.call(arguments, 1); + var regexp = /%s/g; + var match_count = 0; + var rv = format_string.replace(regexp, function(match) { + var rv = insertions[match_count]; + match_count++; + return rv; + }); + return rv; +} + +function test_serializer(element) { + //element.normalize(); + var lines = []; + function serialize_element(element, indent) { + var indent_spaces = (new Array(indent)).join(" "); + switch(element.nodeType) { + case Node.DOCUMENT_TYPE_NODE: + if (element.name) { + if (element.publicId || element.systemId) { + var publicId = element.publicId ? element.publicId : ""; + var systemId = element.systemId ? element.systemId : ""; + lines.push(format("|%s<!DOCTYPE %s \"%s\" \"%s\">", indent_spaces, + element.name, publicId, systemId)); + } else { + lines.push(format("|%s<!DOCTYPE %s>", indent_spaces, + element.name)); + } + } else { + lines.push(format("|%s<!DOCTYPE >", indent_spaces)); + } + break; + case Node.DOCUMENT_NODE: + lines.push("#document"); + break; + case Node.DOCUMENT_FRAGMENT_NODE: + lines.push("#document-fragment"); + break; + case Node.PROCESSING_INSTRUCTION_NODE: + lines.push(format("|%s<?%s %s>", indent_spaces, element.target, element.data)); + break; + case Node.COMMENT_NODE: + lines.push(format("|%s<!-- %s -->", indent_spaces, element.nodeValue)); + break; + case Node.TEXT_NODE: + lines.push(format("|%s\"%s\"", indent_spaces, element.nodeValue)); + break; + case Node.ELEMENT_NODE: + if (element.getAttribute("data-skip") !== null) { + return; + } + if (element.namespaceURI !== null && element.namespaceURI !== namespaces.html) { + var name = format("%s %s", prefixes[element.namespaceURI], + element.localName); + } else { + var name = element.localName; + } + lines.push(format("|%s<%s>", indent_spaces, name)); + + var attributes = Array.prototype.map.call( + element.attributes, + function(attr) { + var name = (attr.namespaceURI ? prefixes[attr.namespaceURI] + " " : "") + + attr.localName; + return [name, attr.value]; + }); + attributes.sort(function (a, b) { + var x = a[0]; + var y = b[0]; + if (x === y) { + return 0; + } + return x > y ? 1 : -1; + }); + + attributes.forEach( + function(attr) { + var indent_spaces = (new Array(indent + 2)).join(" "); + lines.push(format("|%s%s=\"%s\"", indent_spaces, attr[0], attr[1])); + } + ); + break; + } + indent += 2; + Array.prototype.forEach.call(element.childNodes, + function(node) { + serialize_element(node, indent); + }); + } + serialize_element(element, 0); + return lines.join("\n"); +} + +function print_diffs(test_id, uri_encoded_input, expected, actual, container) { + container = container ? container : null; + if (actual) { + var diffs = mark_diffs(expected, actual); + var expected_text = diffs[0]; + var actual_text = diffs[1]; + } else { + var expected_text = expected; + var actual_text = ""; + } + + var tmpl = ["div", {"id":"${test_id}"}, + ["h2", {}, "${test_id}"], + function(vars) { + if (vars.container !== null) { + return ["div", {"class":"container"}, + ["h3", {}, "innerHTML Container"], + ["pre", {}, vars.container]]; + } else { + return null; + } + }, + ["div", {"id":"input_${test_id}"}, ["h3", {}, "Input"], ["pre", {}, + ["code", {}, decodeURIComponent(uri_encoded_input)]]], + ["div", {"id":"expected_${test_id}"}, ["h3", {}, "Expected"], + ["pre", {}, ["code", {}, expected_text]]], + ["div", {"id":"actual_${test_id}"}, ["h3", {}, "Actual"], + ["pre", {}, ["code", {}, actual_text]]] + ]; + + var diff_dom = template.render(tmpl, {test_id:test_id, container:container}); + document.body.appendChild(diff_dom); +} + +function runTests(tests) { + tests.forEach(function(test){ + var expected = decodeURIComponent(test.expected); + var t = async_test(document.title + ' - ' + test.name); + t.step(function(){ + var video = document.createElement('video'); + var track = document.createElement('track'); + assert_true('src' in track, 'track not supported'); + t.test_id = test.name; + t.url_encoded_input = test.input; + t.expected = expected; + track.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00.000 --> 00:01.000\n')+test.input; + track['default'] = true; + track.kind = 'subtitles'; + track.onload = t.step_func(trackLoaded); + track.onerror = t.step_func(trackError); + video.appendChild(track); + document.body.appendChild(video); + }); + }); +} + +function trackLoaded(e) { + var track = e.target; + setTimeout(removeElm, 0, track.parentNode); + var cue = track.track.cues[0]; + var frag = cue.getCueAsHTML(); + var got = test_serializer(frag); + if (got !== this.expected) { + print_diffs(this.test_id, this.url_encoded_input, this.expected, got); + } + assert_equals(got, this.expected); + this.done(); +} + +function trackError(e) { + setTimeout(removeElm, 0, e.target.parentNode); + assert_unreached('got error event'); + this.done(); +} + +function removeElm(elm) { + document.body.removeChild(elm); +} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/entities.dat b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/entities.dat new file mode 100644 index 000000000..cddcb27ff --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/entities.dat @@ -0,0 +1,114 @@ +#data +& +#errors +#document-fragment +| "&" + +#data +& +#errors +#document-fragment +| "&" + +#data +& +#errors +#document-fragment +| "&" + +#data +& +#errors +#document-fragment +| "&" + +#data +< +#errors +#document-fragment +| "<" + +#data +> +#errors +#document-fragment +| ">" + +#data +a‎b +#errors +#document-fragment +| "ab" + +#data +a‏b +#errors +#document-fragment +| "ab" + +#data +" +#errors +#document-fragment +| """ + +#data + +#errors +#document-fragment +| " " + +#data +© +#errors +#document-fragment +| "©" + +#data +&& +#errors +#document-fragment +| "&&" + +#data +&1 +#errors +#document-fragment +| "&1" + +#data +&1; +#errors +#document-fragment +| "&1;" + +#data +&< +#errors +#document-fragment +| "&" + +#data +&<c +#errors +#document-fragment +| "&" +| <span> + +#data +  +#errors +#document-fragment +| " " + +#data +  +#errors +#document-fragment +| " " + +#data +&; +#errors +#document-fragment +| "&;" diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tags.dat b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tags.dat new file mode 100644 index 000000000..425af32e2 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tags.dat @@ -0,0 +1,56 @@ +#data +< +#errors +#document-fragment + +#data +<< +#errors +#document-fragment + +#data +< +#errors +#document-fragment + +#data +< + +#errors +#document-fragment + +#data +< +#errors +#document-fragment + +#data +<. +#errors +#document-fragment + +#data +<c. +#errors +#document-fragment +| <span> + +#data +</ +#errors +#document-fragment + +#data +<c></>x +#errors +#document-fragment +| <span> +| "x" + +#data +<c></ +c>x +#errors +#document-fragment +| <span> +| "x" diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/timestamps.dat b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/timestamps.dat new file mode 100644 index 000000000..ba0f686ae --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/timestamps.dat @@ -0,0 +1,58 @@ +#data +<0 +#errors +#document-fragment + +#data +<0.500 +#errors +#document-fragment + +#data +<0:00.500 +#errors +#document-fragment + +#data +<00:00.500 +#errors +#document-fragment +| <?timestamp 00:00:00.500> + +#data +<00:00:00.500 +#errors +#document-fragment +| <?timestamp 00:00:00.500> + +#data +test<00:00:00.500>test +#errors +#document-fragment +| "test" +| <?timestamp 00:00:00.500> +| "test" + +#data +test<01:00:00.000>test +#errors +#document-fragment +| "test" +| <?timestamp 01:00:00.000> +| "test" + +#data +test<10:00:00.000>test +#errors +#document-fragment +| "test" +| <?timestamp 10:00:00.000> +| "test" + +#data +test<100:00:00.000>test +#errors +#document-fragment +| "test" +| <?timestamp 100:00:00.000> +| "test" diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tree-building.dat b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tree-building.dat new file mode 100644 index 000000000..08410d1ff --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tree-building.dat @@ -0,0 +1,171 @@ +#data +test +#errors +#document-fragment +| "test" + +#data +<c>test +#errors +#document-fragment +| <span> +| "test" + +#data +<i>test +#errors +#document-fragment +| <i> +| "test" + +#data +<b>test +#errors +#document-fragment +| <b> +| "test" + +#data +<u>test +#errors +#document-fragment +| <u> +| "test" + +#data +<ruby>test +#errors +#document-fragment +| <ruby> +| "test" + +#data +<rt>test +#errors +#document-fragment +| "test" + +#data +<ruby>test<rt>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| "test" + +#data +<ruby>test<rt>test</rt>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| "test" +| "test" + +#data +<ruby>test<rt>test</rt></ruby>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| "test" +| "test" + +#data +<ruby>test<rt>test</ruby>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| "test" +| "test" + +#data +<ruby>test<rt><b>test</rt></ruby>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| <b> +| "test" +| "test" + +#data +<ruby>test<rt><b>test</ruby>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| <b> +| "test" +| "test" + +#data +<ruby>test<rt><b>test</rt></ruby></b>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| <b> +| "test" +| "test" + +#data +<ruby>test<rt><b>test</rt></b></ruby>test +#errors +#document-fragment +| <ruby> +| "test" +| <rt> +| <b> +| "test" +| "test" + +#data +<v>test +#errors +#document-fragment +| <span> +| title="" +| "test" + +#data +<v a>test +#errors +#document-fragment +| <span> +| title="a" +| "test" + +#data +<v a b>test +#errors +#document-fragment +| <span> +| title="a b" +| "test" + +#data +<v.a>test +#errors +#document-fragment +| <span> +| class="a" +| title="" +| "test" + +#data +<v.a.b>test +#errors +#document-fragment +| <span> +| class="a b" +| title="" +| "test" diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/entities.html b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/entities.html new file mode 100644 index 000000000..2568258a2 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/entities.html @@ -0,0 +1,32 @@ +<!doctype html> +<title>WebVTT cue data parser test entities</title> +<style>video { display:none }</style> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/html/syntax/parsing/template.js></script> +<script src=/html/syntax/parsing/common.js></script> +<script src=../common.js></script> +<div id=log></div> +<script> +runTests([ +{name:'3686fc0cdc60dc536e75df054b0bd372273db2cc', input:'%26', expected:'%23document-fragment%0A%7C%20%22%26%22'}, +{name:'f1869f6e2853635eec81cc3afa3e2b8148ccbdc0', input:'%26amp', expected:'%23document-fragment%0A%7C%20%22%26amp%22'}, +{name:'92d76530d723b6b4e4ef8280c01cf1c80f9bebdb', input:'%26amp%3B', expected:'%23document-fragment%0A%7C%20%22%26%22'}, +{name:'261cd4e9df4a12535b66a0c39e9635aab2bb19aa', input:'%26AMP%3B', expected:'%23document-fragment%0A%7C%20%22%26AMP%3B%22'}, +{name:'1a2269cdb73bf97ec6a99b0edabfe646c471b67e', input:'%26lt%3B', expected:'%23document-fragment%0A%7C%20%22%3C%22'}, +{name:'44ceb90884cceeeccb4f7024e3598f7dc5ceebfa', input:'%26gt%3B', expected:'%23document-fragment%0A%7C%20%22%3E%22'}, +{name:'05def72af03fc2b1617da950d871b9fd0ba20e5a', input:'a%26lrm%3Bb', expected:'%23document-fragment%0A%7C%20%22a%E2%80%8Eb%22'}, +{name:'da999a55445eca43aa41e039ec439c1a812db297', input:'a%26rlm%3Bb', expected:'%23document-fragment%0A%7C%20%22a%E2%80%8Fb%22'}, +{name:'0fd9e3823b62c028c1d50e35b1f3ee3df02a62eb', input:'%26quot%3B', expected:'%23document-fragment%0A%7C%20%22%26quot%3B%22'}, +{name:'e7387003fbacb22b706796c98b781eb4ebf5ff85', input:'%26nbsp%3B', expected:'%23document-fragment%0A%7C%20%22%C2%A0%22'}, +{name:'216cd0e914b9f2ccd04eff6d02a0b1ce24441d95', input:'%26copy%3B', expected:'%23document-fragment%0A%7C%20%22%26copy%3B%22'}, +{name:'2cdf20980d17a5d077299215e6a7e97f3c6b07e2', input:'%26%26', expected:'%23document-fragment%0A%7C%20%22%26%26%22'}, +{name:'83f4500c0bd8598480713997a041d8f70fd3f11e', input:'%261', expected:'%23document-fragment%0A%7C%20%22%261%22'}, +{name:'2c6b2ba38a08eca45370f28a5b7df2aa463fb3dc', input:'%261%3B', expected:'%23document-fragment%0A%7C%20%22%261%3B%22'}, +{name:'f4bb977c0a06851bdd19260c035a766c5c8ea093', input:'%26%3C', expected:'%23document-fragment%0A%7C%20%22%26%22'}, +{name:'b1fff1ac42688d16e00f6c758d84e5152e39702d', input:'%26%3Cc', expected:'%23document-fragment%0A%7C%20%22%26%22%0A%7C%20%3Cspan%3E'}, +{name:'bd68f6beda2c2264e61dff7359c1ad48bc0a9934', input:'%26%2332%3B', expected:'%23document-fragment%0A%7C%20%22%26%2332%3B%22'}, +{name:'5b77a0be23453dfe6eea59d43bb0708f89e1df82', input:'%26%23x20%3B', expected:'%23document-fragment%0A%7C%20%22%26%23x20%3B%22'}, +{name:'87986551b0e6180cb279f2aa4cdddf77daa90c11', input:'%26%3B', expected:'%23document-fragment%0A%7C%20%22%26%3B%22'} +]); +</script> diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tags.html b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tags.html new file mode 100644 index 000000000..d42478dc9 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tags.html @@ -0,0 +1,23 @@ +<!doctype html> +<title>WebVTT cue data parser test tags</title> +<style>video { display:none }</style> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/html/syntax/parsing/template.js></script> +<script src=/html/syntax/parsing/common.js></script> +<script src=../common.js></script> +<div id=log></div> +<script> +runTests([ +{name:'d49e42f7582c6f00b2569f2d14629611c0c6b0e6', input:'%3C', expected:'%23document-fragment'}, +{name:'9dd187edd10c907e6b92148fd82940e401dbe79f', input:'%3C%3C', expected:'%23document-fragment'}, +{name:'2d2c4333983e23a4962083e8120e5d42c839f77b', input:'%3C%09', expected:'%23document-fragment'}, +{name:'94f898df44b470e2d05d74c6816fd908e55c9fdf', input:'%3C%0A', expected:'%23document-fragment'}, +{name:'2fdc1b84ba41ec98833851e80781df1fbe72182f', input:'%3C%20', expected:'%23document-fragment'}, +{name:'487690a6f5da4666f9caaf3a3ecc10992aca1414', input:'%3C.', expected:'%23document-fragment'}, +{name:'0d7df935b172f2a1b357b94596d68f2443f30f8b', input:'%3Cc.', expected:'%23document-fragment%0A%7C%20%3Cspan%3E'}, +{name:'cd1d6dd274e03ae8fc56bc4ef163998d9ff24496', input:'%3C/', expected:'%23document-fragment'}, +{name:'fca1a11d42b735453117f42456360e88082a3fd7', input:'%3Cc%3E%3C/%3Ex', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20%22x%22'}, +{name:'fe3b6277edf5c2f84e7a6779eddd0cac30552bca', input:'%3Cc%3E%3C/%0Ac%3Ex', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20%22x%22'} +]); +</script> diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/timestamps.html b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/timestamps.html new file mode 100644 index 000000000..bc19e2d8e --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/timestamps.html @@ -0,0 +1,22 @@ +<!doctype html> +<title>WebVTT cue data parser test timestamps</title> +<style>video { display:none }</style> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/html/syntax/parsing/template.js></script> +<script src=/html/syntax/parsing/common.js></script> +<script src=../common.js></script> +<div id=log></div> +<script> +runTests([ +{name:'54c245f3fbe7a3e25398b13971d44f2bb3a5f947', input:'%3C0', expected:'%23document-fragment'}, +{name:'5e190a1b4541fcb10e403af111c14ef152fecb0d', input:'%3C0.500', expected:'%23document-fragment'}, +{name:'92b97d3497836259e0b9305e27f2b91ea1dc9b31', input:'%3C0%3A00.500', expected:'%23document-fragment'}, +{name:'47fa4306a695161da88533d456ce94829e53b13d', input:'%3C00%3A00.500', expected:'%23document-fragment%0A%7C%20%3C%3Ftimestamp%2000%3A00%3A00.500%3E'}, +{name:'c1036a4322c1852e02e5a1843a9a81dfca6d7af3', input:'%3C00%3A00%3A00.500', expected:'%23document-fragment%0A%7C%20%3C%3Ftimestamp%2000%3A00%3A00.500%3E'}, +{name:'70ec34d828ca661a583c651207becb968bb41653', input:'test%3C00%3A00%3A00.500%3Etest', expected:'%23document-fragment%0A%7C%20%22test%22%0A%7C%20%3C%3Ftimestamp%2000%3A00%3A00.500%3E%0A%7C%20%22test%22'}, +{name:'66ba641ff047a226fa60fe867fd2479d40f3ff0f', input:'test%3C01%3A00%3A00.000%3Etest', expected:'%23document-fragment%0A%7C%20%22test%22%0A%7C%20%3C%3Ftimestamp%2001%3A00%3A00.000%3E%0A%7C%20%22test%22'}, +{name:'398e8da1aaaf392739ca72057fef58bd5333f74d', input:'test%3C10%3A00%3A00.000%3Etest', expected:'%23document-fragment%0A%7C%20%22test%22%0A%7C%20%3C%3Ftimestamp%2010%3A00%3A00.000%3E%0A%7C%20%22test%22'}, +{name:'391fce67644cf4dd9967e1436d1449ef5baf675f', input:'test%3C100%3A00%3A00.000%3Etest', expected:'%23document-fragment%0A%7C%20%22test%22%0A%7C%20%3C%3Ftimestamp%20100%3A00%3A00.000%3E%0A%7C%20%22test%22'} +]); +</script> diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tree-building.html b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tree-building.html new file mode 100644 index 000000000..98062f830 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tree-building.html @@ -0,0 +1,33 @@ +<!doctype html> +<title>WebVTT cue data parser test tree-building</title> +<style>video { display:none }</style> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/html/syntax/parsing/template.js></script> +<script src=/html/syntax/parsing/common.js></script> +<script src=../common.js></script> +<div id=log></div> +<script> +runTests([ +{name:'4e1243bd22c66e76c2ba9eddc1f91394e57f9f83', input:'test', expected:'%23document-fragment%0A%7C%20%22test%22'}, +{name:'6ceded63b53eeab3681a0fc540e959ca88f7dce9', input:'%3Cc%3Etest', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20%22test%22'}, +{name:'71de37451e7d5524eacc8a190d21cd64c4304e14', input:'%3Ci%3Etest', expected:'%23document-fragment%0A%7C%20%3Ci%3E%0A%7C%20%20%20%22test%22'}, +{name:'985284b688a09f1f55e3c9aab49d7e4ca11f870a', input:'%3Cb%3Etest', expected:'%23document-fragment%0A%7C%20%3Cb%3E%0A%7C%20%20%20%22test%22'}, +{name:'fa6993eaa94404648d8b52e2830e53369404fdcb', input:'%3Cu%3Etest', expected:'%23document-fragment%0A%7C%20%3Cu%3E%0A%7C%20%20%20%22test%22'}, +{name:'e4d351e1a6b40a7dace801b722efaa200c4895f2', input:'%3Cruby%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22'}, +{name:'68e1d0376f827ebe0c047751a2067594ff41b612', input:'%3Crt%3Etest', expected:'%23document-fragment%0A%7C%20%22test%22'}, +{name:'2564487cfc7e317428fb437ef8de8de4f4963426', input:'%3Cruby%3Etest%3Crt%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%22test%22'}, +{name:'9b1902c975558eeaff4afbaf0a6dc100e1978769', input:'%3Cruby%3Etest%3Crt%3Etest%3C/rt%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%22test%22%0A%7C%20%20%20%22test%22'}, +{name:'119c596ea09649d3bd03934485e3067e89377412', input:'%3Cruby%3Etest%3Crt%3Etest%3C/rt%3E%3C/ruby%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%22test%22%0A%7C%20%22test%22'}, +{name:'c94512b045699cb72f730e46b2a0a3bed2c939f9', input:'%3Cruby%3Etest%3Crt%3Etest%3C/ruby%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%22test%22%0A%7C%20%22test%22'}, +{name:'325c1e590e74f1ff33ca5b4838c04cf6b6dd71ba', input:'%3Cruby%3Etest%3Crt%3E%3Cb%3Etest%3C/rt%3E%3C/ruby%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%22test%22%0A%7C%20%20%20%20%20%20%20%22test%22'}, +{name:'92847ed2694c9639ba96f4cc61e2215362a74904', input:'%3Cruby%3Etest%3Crt%3E%3Cb%3Etest%3C/ruby%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%22test%22%0A%7C%20%20%20%20%20%20%20%22test%22'}, +{name:'c0da62d1c8716ca544c96799f06ac7e4664500fb', input:'%3Cruby%3Etest%3Crt%3E%3Cb%3Etest%3C/rt%3E%3C/ruby%3E%3C/b%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%22test%22%0A%7C%20%20%20%20%20%22test%22'}, +{name:'b85bd616672eba0591718182ef32e3307d223bb0', input:'%3Cruby%3Etest%3Crt%3E%3Cb%3Etest%3C/rt%3E%3C/b%3E%3C/ruby%3Etest', expected:'%23document-fragment%0A%7C%20%3Cruby%3E%0A%7C%20%20%20%22test%22%0A%7C%20%20%20%3Crt%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%22test%22%0A%7C%20%22test%22'}, +{name:'ab2024b4e65ed64a751adbe8aae1e84ee61bf3e6', input:'%3Cv%3Etest', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20title%3D%22%22%0A%7C%20%20%20%22test%22'}, +{name:'10f4823ffb17c71654c4602bc45c58300e3ecbcc', input:'%3Cv%20a%3Etest', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20title%3D%22a%22%0A%7C%20%20%20%22test%22'}, +{name:'909924ef392fb20c9526acfa4f18f891eda61a0c', input:'%3Cv%20a%20b%3Etest', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20title%3D%22a%20b%22%0A%7C%20%20%20%22test%22'}, +{name:'e5ca35cc29404efc0ebd58aa5f6efefc86fc5287', input:'%3Cv.a%3Etest', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20class%3D%22a%22%0A%7C%20%20%20title%3D%22%22%0A%7C%20%20%20%22test%22'}, +{name:'e535c486dac7dc571463b150adc55fd841bc3008', input:'%3Cv.a.b%3Etest', expected:'%23document-fragment%0A%7C%20%3Cspan%3E%0A%7C%20%20%20class%3D%22a%20b%22%0A%7C%20%20%20title%3D%22%22%0A%7C%20%20%20%22test%22'} +]); +</script> diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html new file mode 100644 index 000000000..2cba0a1ad --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html @@ -0,0 +1,96 @@ +<!doctype html> +<title>WebVTT parser tests</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script> +setup({explicit_done: true}); +var files = []; +var path = 'support/'; +var cueDefaults = { +"id":"", +"startTime":0, +"endTime":1, +"pauseOnExit":false, +//"vertical":"", (not supported) +"snapToLines":true, +"line":"auto", +"position":"auto", +"size":100, +"align":"center" +} +var cueCounts; +(function(){ + var xhr = new XMLHttpRequest(); + xhr.open('GET', path+'cue-counts.json', true); + xhr.onreadystatechange = function() { + if (xhr.readyState == 4) { + cueCounts = JSON.parse(xhr.responseText); + for (var file in cueCounts) { + files.push(file); + } + startTests(); + } + } + xhr.send(); +})(); + +function checkProps(cue, exp, i) { + for (var prop in cueDefaults) { + if (!(prop in exp)) + exp[prop] = cueDefaults[prop]; + assert_equals(cue[prop], exp[prop], prop + ' (cue '+(i+1)+')'); + } +} + +function startTests() { + files.forEach(function(file) { + var t = async_test(document.title+', '+file); + t.step(function(){ + var video = document.createElement('video'); + var track = document.createElement('track'); + assert_true('src' in track, 'track element not supported'); + track.src = path + file; + track['default'] = true; + track.kind = 'subtitles'; + track.onload = this.step_func(trackLoaded); + track.onerror = this.step_func(trackError); + video.appendChild(track); + document.body.appendChild(video); + }); + }); + done(); +} + +function trackLoaded(e) { + var track = e.target; + var video = track.parentNode; + setTimeout(removeElm, 0, video); + var cues = video.textTracks[0].cues; + var file = track.src.substr(track.src.lastIndexOf('/') + 1); + assert_equals(cues.length, cueCounts[file], 'number of cues'); + var expected; + var cue; + for (var i = 0; i < cues.length; ++i) { + cue = cues[i]; + expected = JSON.parse(cue.text); + assert_not_equals(expected, 'FAIL', 'cue '+(i+1)+' should have been dropped'); + checkProps(cue, expected, i); + } + this.done(); +} + +function trackError(e) { + var track = e.target; + var video = track.parentNode; + setTimeout(removeElm, 0, video); + var file = track.src.substr(track.src.lastIndexOf('/') + 1); + assert_equals('error', cueCounts[file], 'got unexpected error event'); + this.done(); +} + +function removeElm(elm) { + document.body.removeChild(elm); +} + +</script> diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/arrows.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/arrows.vtt new file mode 100644 index 000000000..057cede29 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/arrows.vtt @@ -0,0 +1,19 @@ +WEBVTT + +--> +00:00:00.000 --> 00:00:01.000 +{} +foo--> +00:00:00.000 --> 00:00:01.000 +{} +-->foo +00:00:00.000 --> 00:00:01.000 +{} +---> +00:00:00.000 --> 00:00:01.000 +{} +-->--> +00:00:00.000 --> 00:00:01.000 +{} +00:00:00.000 --> 00:00:01.000 +{} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/cue-counts.json b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/cue-counts.json new file mode 100644 index 000000000..7fcf35b6b --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/cue-counts.json @@ -0,0 +1,36 @@ +{"settings-vertical.vtt":6, +"settings-size.vtt":12, +"settings-position.vtt":13, +"settings-multiple.vtt":2, +"settings-line.vtt":29, +"settings-align.vtt":9, +"signature-bom.vtt":0, +"signature-space.vtt":0, +"signature-space-no-newline.vtt":0, +"signature-tab.vtt":0, +"signature-tab-no-newline.vtt":0, +"signature-timings.vtt":0, +"signature-two-boms.vtt":"error", +"signature-lowercase.vtt":"error", +"signature-too-short.vtt":"error", +"signature-websrt.vtt":"error", +"signature-formfeed.vtt":"error", +"signature-null.vtt":"error", +"signature-no-newline.vtt":0, +"no-signature.vtt":"error", +"nulls.vtt":7, +"header-garbage.vtt":1, +"header-timings.vtt":1, +"header-space.vtt":1, +"header-tab.vtt":1, +"ids.vtt":5, +"arrows.vtt":6, +"space-chars.vtt":3, +"timings-garbage.vtt":0, +"timings-too-short.vtt":2, +"timings-too-long.vtt":2, +"newlines.vtt":4, +"omitted-hours.vtt":3, +"timings-60.vtt":2, +"timings-negative.vtt":4 +} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-garbage.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-garbage.vtt new file mode 100644 index 000000000..5935db50f --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-garbage.vtt @@ -0,0 +1,5 @@ +WEBVTT +foobar + +00:00:00.000 --> 00:00:01.000 +{}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-space.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-space.vtt new file mode 100644 index 000000000..62a742638 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-space.vtt @@ -0,0 +1,4 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 +{} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-tab.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-tab.vtt new file mode 100644 index 000000000..f8eac7084 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-tab.vtt @@ -0,0 +1,4 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 +{} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-timings.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-timings.vtt new file mode 100644 index 000000000..bd084debc --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-timings.vtt @@ -0,0 +1,3 @@ +WEBVTT +00:00:00.000 --> 00:00:01.000 +{}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/ids.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/ids.vtt new file mode 100644 index 000000000..ea335ee9e --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/ids.vtt @@ -0,0 +1,21 @@ +WEBVTT + + leading space +00:00:00.000 --> 00:00:01.000 +{"id":" leading space"} + +trailing space +00:00:00.000 --> 00:00:01.000 +{"id":"trailing space "} + +-- > +00:00:00.000 --> 00:00:01.000 +{"id":"-- >"} + +-> +00:00:00.000 --> 00:00:01.000 +{"id":"->"} + + +00:00:00.000 --> 00:00:01.000 +{"id":" "}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/newlines.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/newlines.vtt new file mode 100644 index 000000000..ee2f00804 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/newlines.vtt @@ -0,0 +1,12 @@ +WEBVTT
cr
00:00:00.000 --> 00:00:01.000
{"id":"cr"} + +lf +00:00:00.000 --> 00:00:01.000 +{"id":"lf"}
+
+crlf
+00:00:00.000 --> 00:00:01.000
+{"id":"crlf"} +
lfcr
00:00:00.000 --> 00:00:01.000 +{"id":"lfcr"} +
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/no-signature.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/no-signature.vtt new file mode 100644 index 000000000..44ad48084 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/no-signature.vtt @@ -0,0 +1,2 @@ +00:00:00.000 --> 00:00:01.000 +"FAIL" diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/nulls.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/nulls.vtt Binary files differnew file mode 100644 index 000000000..85669c265 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/nulls.vtt diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/omitted-hours.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/omitted-hours.vtt new file mode 100644 index 000000000..3222dea37 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/omitted-hours.vtt @@ -0,0 +1,10 @@ +WEBVTT + +00:00.000 --> 00:00:01.000 +{} + +00:00:00.000 --> 00:01.000 +{} + +00:00.000 --> 00:01.000 +{} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-align.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-align.vtt new file mode 100644 index 000000000..1a7ae1b6e --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-align.vtt @@ -0,0 +1,28 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 align:start +{"align":"start"} + +00:00:00.000 --> 00:00:01.000 align:center +{"align":"center"} + +00:00:00.000 --> 00:00:01.000 align:end +{"align":"end"} + +00:00:00.000 --> 00:00:01.000 align:start align:end +{"align":"end"} + +00:00:00.000 --> 00:00:01.000 align:end align:CENTER +{"align":"end"} + +00:00:00.000 --> 00:00:01.000 align:end align: center +{"align":"end"} + +00:00:00.000 --> 00:00:01.000 align:end align: +{"align":"end"} + +00:00:00.000 --> 00:00:01.000 align:end align +{"align":"end"} + +00:00:00.000 --> 00:00:01.000 align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:end align:center +{"align":"center"}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-line.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-line.vtt new file mode 100644 index 000000000..615ee7748 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-line.vtt @@ -0,0 +1,88 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 line:-1 +{"line":-1} + +00:00:00.000 --> 00:00:01.000 line:0 +{"line":0} + +00:00:00.000 --> 00:00:01.000 line:-0 +{"line":0} + +00:00:00.000 --> 00:00:01.000 line:1 +{"line":1} + +00:00:00.000 --> 00:00:01.000 line:100 +{"line":100} + +00:00:00.000 --> 00:00:01.000 line:101 +{"line":101} + +00:00:00.000 --> 00:00:01.000 line:65536 +{"line":65536} + +00:00:00.000 --> 00:00:01.000 line:4294967296 +{"line":4294967296} + +00:00:00.000 --> 00:00:01.000 line:18446744073709552000 +{"line":18446744073709552000} + +00:00:00.000 --> 00:00:01.000 line:10000000000000000000000000000000000 +{"line":10000000000000000000000000000000000} + +00:00:00.000 --> 00:00:01.000 line:65536% +{} + +00:00:00.000 --> 00:00:01.000 line:4294967296% +{} + +00:00:00.000 --> 00:00:01.000 line:18446744073709552000% +{} + +00:00:00.000 --> 00:00:01.000 line:10000000000000000000000000000000000% +{} + +00:00:00.000 --> 00:00:01.000 line:1.5 +{"line":1.5} + +00:00:00.000 --> 00:00:01.000 line:0% +{"snapToLines":false, "line":0} + +00:00:00.000 --> 00:00:01.000 line:-0% +{} + +00:00:00.000 --> 00:00:01.000 line:101% +{} + +00:00:00.000 --> 00:00:01.000 line:100% +{"snapToLines":false, "line":100} + +00:00:00.000 --> 00:00:01.000 line:1%- +{} + +00:00:00.000 --> 00:00:01.000 line:1- +{} + +00:00:00.000 --> 00:00:01.000 line:%1 +{} + +00:00:00.000 --> 00:00:01.000 line:1%% +{} + +00:00:00.000 --> 00:00:01.000 line:00% +{"snapToLines":false, "line":0} + +00:00:00.000 --> 00:00:01.000 line:0%0 +{} + +00:00:00.000 --> 00:00:01.000 line: 0% +{} + +00:00:00.000 --> 00:00:01.000 line:0%x +{} + +00:00:00.000 --> 00:00:01.000 line:- +{} + +00:00:00.000 --> 00:00:01.000 line:% +{}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-multiple.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-multiple.vtt new file mode 100644 index 000000000..37338bb37 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-multiple.vtt @@ -0,0 +1,16 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 align:start line:1% vertical:lr size:50% position:25% +{"align":"start", +"line":1, +"snapToLines":false, +"vertical":"lr", +"size":50, +"position":25} + +00:00:00.000 --> 00:00:01.000 align:center line:1 vertical:rl size:0% position:100% +{"align":"center", +"line":1, +"vertical":"rl", +"size":0, +"position":100}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-position.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-position.vtt new file mode 100644 index 000000000..53a03ff64 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-position.vtt @@ -0,0 +1,40 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 position:-1% +{} + +00:00:00.000 --> 00:00:01.000 position:1 +{} + +00:00:00.000 --> 00:00:01.000 position:1x +{} + +00:00:00.000 --> 00:00:01.000 position:1%x +{} + +00:00:00.000 --> 00:00:01.000 position: +{} + +00:00:00.000 --> 00:00:01.000 position: 1% +{} + +00:00:00.000 --> 00:00:01.000 position:1% +{"position":1} + +00:00:00.000 --> 00:00:01.000 position:100% +{"position":100} + +00:00:00.000 --> 00:00:01.000 position:101% +{} + +00:00:00.000 --> 00:00:01.000 position:1% position:x +{"position":1} + +00:00:00.000 --> 00:00:01.000 position:1.5% +{"position":1.5} + +00:00:00.000 --> 00:00:01.000 position:65536% +{} + +00:00:00.000 --> 00:00:01.000 position:4294967296% +{}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-size.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-size.vtt new file mode 100644 index 000000000..5de885fd3 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-size.vtt @@ -0,0 +1,37 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 size: +{} + +00:00:00.000 --> 00:00:01.000 size:x +{} + +00:00:00.000 --> 00:00:01.000 size:1xx size:2% +{"size":2} + +00:00:00.000 --> 00:00:01.000 size:% +{} + +00:00:00.000 --> 00:00:01.000 size:%% +{} + +00:00:00.000 --> 00:00:01.000 size:1%% +{} + +00:00:00.000 --> 00:00:01.000 size:1%x +{} + +00:00:00.000 --> 00:00:01.000 size:0% +{"size":0} + +00:00:00.000 --> 00:00:01.000 size:00% +{"size":0} + +00:00:00.000 --> 00:00:01.000 size:50% size:100% +{"size":100} + +00:00:00.000 --> 00:00:01.000 size:101% +{} + +00:00:00.000 --> 00:00:01.000 size:50% size:101% +{"size":50}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-vertical.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-vertical.vtt new file mode 100644 index 000000000..cae64cbf8 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-vertical.vtt @@ -0,0 +1,19 @@ +WEBVTT + +00:00:00.000 --> 00:00:01.000 vertical:lr +{"vertical":"lr"} + +00:00:00.000 --> 00:00:01.000 vertical:rl +{"vertical":"rl"} + +00:00:00.000 --> 00:00:01.000 vertical:rl vertical:lr +{"vertical":"lr"} + +00:00:00.000 --> 00:00:01.000 vertical: +{} + +00:00:00.000 --> 00:00:01.000 vertical:RL +{} + +00:00:00.000 --> 00:00:01.000 vertical:vertical-rl +{}
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-bom.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-bom.vtt new file mode 100644 index 000000000..c0a105777 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-bom.vtt @@ -0,0 +1 @@ +WEBVTT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-formfeed.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-formfeed.vtt new file mode 100644 index 000000000..0ba528637 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-formfeed.vtt @@ -0,0 +1 @@ +WEBVTT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-lowercase.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-lowercase.vtt new file mode 100644 index 000000000..994d1694f --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-lowercase.vtt @@ -0,0 +1 @@ +webvtt diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-no-newline.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-no-newline.vtt new file mode 100644 index 000000000..af1827ddf --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-no-newline.vtt @@ -0,0 +1 @@ +WEBVTT
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-null.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-null.vtt Binary files differnew file mode 100644 index 000000000..ead93cc16 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-null.vtt diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space-no-newline.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space-no-newline.vtt new file mode 100644 index 000000000..6abbf425a --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space-no-newline.vtt @@ -0,0 +1 @@ +WEBVTT
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space.vtt new file mode 100644 index 000000000..1352a2093 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space.vtt @@ -0,0 +1 @@ +WEBVTT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab-no-newline.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab-no-newline.vtt new file mode 100644 index 000000000..e28ec9b83 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab-no-newline.vtt @@ -0,0 +1 @@ +WEBVTT
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab.vtt new file mode 100644 index 000000000..ab4bb0ea6 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab.vtt @@ -0,0 +1 @@ +WEBVTT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-timings.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-timings.vtt new file mode 100644 index 000000000..036788609 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-timings.vtt @@ -0,0 +1,2 @@ +WEBVTT 00:00:00.000 --> 00:00:01.000 +"FAIL" diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-too-short.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-too-short.vtt new file mode 100644 index 000000000..3e5de2b6c --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-too-short.vtt @@ -0,0 +1 @@ +WEBVT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-two-boms.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-two-boms.vtt new file mode 100644 index 000000000..05c973be1 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-two-boms.vtt @@ -0,0 +1 @@ +WEBVTT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-websrt.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-websrt.vtt new file mode 100644 index 000000000..4a02525e3 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-websrt.vtt @@ -0,0 +1 @@ +WEBSRT diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/space-chars.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/space-chars.vtt new file mode 100644 index 000000000..012e94dea --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/space-chars.vtt @@ -0,0 +1,17 @@ +WEBVTT + +spaces + 00:00:00.000 --> 00:00:01.000 +{"id":"spaces"} + +tabs + 00:00:00.000 --> 00:00:01.000 +{"id":"tabs"} + +form feed +00:00:00.000-->00:00:01.000 +{"id":"form feed"} + +vertical tab +00:00:00.000-->00:00:01.000 +"FAIL"
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-60.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-60.vtt new file mode 100644 index 000000000..137a56e41 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-60.vtt @@ -0,0 +1,20 @@ +WEBVTT + +00:00:60.000 --> 00:00:01.000 +"FAIL" + +00:60:00.000 --> 00:00:01.000 +"FAIL" + +00:00:00.000 --> 00:00:60.000 +"FAIL" + +00:00:00.000 --> 00:60:00.000 +"FAIL" + +00:00:00.000 --> 60:00:01.000 +{"endTime":216001} + +60:00:00.000 --> 60:00:01.000 +{"startTime":216000, +"endTime":216001} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-garbage.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-garbage.vtt new file mode 100644 index 000000000..896986737 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-garbage.vtt @@ -0,0 +1,190 @@ +WEBVTT + +x00:00:00.000 --> 00:00:01.000 +"FAIL" + +0x0:00:00.000 --> 00:00:01.000 +"FAIL" + +00x:00:00.000 --> 00:00:01.000 +"FAIL" + +00:x00:00.000 --> 00:00:01.000 +"FAIL" + +00:0x0:00.000 --> 00:00:01.000 +"FAIL" + +00:00x:00.000 --> 00:00:01.000 +"FAIL" + +00:00:x00.000 --> 00:00:01.000 +"FAIL" + +00:00:0x0.000 --> 00:00:01.000 +"FAIL" + +00:00:00x.000 --> 00:00:01.000 +"FAIL" + +00:00:00.x000 --> 00:00:01.000 +"FAIL" + +00:00:00.0x00 --> 00:00:01.000 +"FAIL" + +00:00:00.00x0 --> 00:00:01.000 +"FAIL" + +00:00:00.000x --> 00:00:01.000 +"FAIL" + +00:00:00.000 x--> 00:00:01.000 +"FAIL" + +00:00:00.000 -x-> 00:00:01.000 +"FAIL" + +00:00:00.000 --x> 00:00:01.000 +"FAIL" + +00:00:00.000 -->x 00:00:01.000 +"FAIL" + +00:00:00.000 --> x00:00:01.000 +"FAIL" + +00:00:00.000 --> 0x0:00:01.000 +"FAIL" + +00:00:00.000 --> 00x:00:01.000 +"FAIL" + +00:00:00.000 --> 00:x00:01.000 +"FAIL" + +00:00:00.000 --> 00:0x0:01.000 +"FAIL" + +00:00:00.000 --> 00:00x:01.000 +"FAIL" + +00:00:00.000 --> 00:00:x01.000 +"FAIL" + +00:00:00.000 --> 00:00:0x1.000 +"FAIL" + +00:00:00.000 --> 00:00:01x.000 +"FAIL" + +00:00:00.000 --> 00:00:01.x000 +"FAIL" + +00:00:00.000 --> 00:00:01.0x00 +"FAIL" + +00:00:00.000 --> 00:00:01.00x0 +"FAIL" + +x0:00:00.000 --> 00:00:01.000 +"FAIL" + +0x:00:00.000 --> 00:00:01.000 +"FAIL" + +00x00:00.000 --> 00:00:01.000 +"FAIL" + +00:x0:00.000 --> 00:00:01.000 +"FAIL" + +00:0x:00.000 --> 00:00:01.000 +"FAIL" + +00:00x00.000 --> 00:00:01.000 +"FAIL" + +00:00:x0.000 --> 00:00:01.000 +"FAIL" + +00:00:0x.000 --> 00:00:01.000 +"FAIL" + +00:00:00x000 --> 00:00:01.000 +"FAIL" + +00:00:00.x00 --> 00:00:01.000 +"FAIL" + +00:00:00.0x0 --> 00:00:01.000 +"FAIL" + +00:00:00.00x --> 00:00:01.000 +"FAIL" + +00:00:00.000x--> 00:00:01.000 +"FAIL" + +00:00:00.000 x-> 00:00:01.000 +"FAIL" + +00:00:00.000 -x> 00:00:01.000 +"FAIL" + +00:00:00.000 --x 00:00:01.000 +"FAIL" + +00:00:00.000 -->x00:00:01.000 +"FAIL" + +00:00:00.000 --> x0:00:01.000 +"FAIL" + +00:00:00.000 --> 0x:00:01.000 +"FAIL" + +00:00:00.000 --> 00x00:01.000 +"FAIL" + +00:00:00.000 --> 00:x0:01.000 +"FAIL" + +00:00:00.000 --> 00:0x:01.000 +"FAIL" + +00:00:00.000 --> 00:00x01.000 +"FAIL" + +00:00:00.000 --> 00:00:x1.000 +"FAIL" + +00:00:00.000 --> 00:00:0x.000 +"FAIL" + +00:00:00.000 --> 00:00:01x000 +"FAIL" + +00:00:00.000 --> 00:00:01.x00 +"FAIL" + +00:00:00.000 --> 00:00:01.0x0 +"FAIL" + +00:00:00.000 --> 00:00:01.00x +"FAIL" + +00.00:00.000 --> 00:00:01.000 +"FAIL" + +00:00.00.000 --> 00:00:01.000 +"FAIL" + +00:00:00:000 --> 00:00:01.000 +"FAIL" + +00:00.00:000 --> 00:00:01.000 +"FAIL" + +00:00:00,000 --> 00:00:01,000 +"FAIL"
\ No newline at end of file diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-negative.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-negative.vtt new file mode 100644 index 000000000..e13f0f254 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-negative.vtt @@ -0,0 +1,13 @@ +WEBVTT + +00:00:00.000 --> 00:00:00.000 +{"endTime":0} + +00:00:01.000 --> 00:00:00.999 +{"startTime":1, "endTime":0.999} + +00:01:00.000 --> 00:00:59.999 +{"startTime":60, "endTime":59.999} + +01:00:00.000 --> 00:59:59.999 +{"startTime":3600, "endTime":3599.999} diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-long.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-long.vtt new file mode 100644 index 000000000..23b498b18 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-long.vtt @@ -0,0 +1,47 @@ +WEBVTT + +000:00:00.000 --> 00:00:01.000 +{} + +00::00:00.000 --> 00:00:01.000 +"FAIL" + +00:000:00.000 --> 00:00:01.000 +"FAIL" + +00:00::00.000 --> 00:00:01.000 +"FAIL" + +00:00:000.000 --> 00:00:01.000 +"FAIL" + +00:00:00..000 --> 00:00:01.000 +"FAIL" + +00:00:00.0000 --> 00:00:01.000 +"FAIL" + +00:00.0000 --> 00:00:01.000 +"FAIL" + +000:00.000 --> 00:01.000 +"FAIL" + +00::00.000 --> 00:01.000 +"FAIL" + +00:000.000 --> 00:01.000 +"FAIL" + +00:00..000 --> 00:01.000 +"FAIL" + +00:00.0000 --> 00:01.000 +"FAIL" + +00:00.000 --> 000:01.000 +"FAIL" + +00:00:00.000 --> 000:00:01.000 +{} + diff --git a/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-short.vtt b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-short.vtt new file mode 100644 index 000000000..864ad3832 --- /dev/null +++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-short.vtt @@ -0,0 +1,98 @@ +WEBVTT + +0:00:00.000 --> 00:00:01.000 +{} + +0000:00.000 --> 00:00:01.000 +"FAIL" + +00:0:00.000 --> 00:00:01.000 +"FAIL" + +00:0000.000 --> 00:00:01.000 +"FAIL" + +00:00:0.000 --> 00:00:01.000 +"FAIL" + +00:00:00000 --> 00:00:01.000 +"FAIL" + +00:00:00.00 --> 00:00:01.000 +"FAIL" + +00:00:00.0 --> 00:00:01.000 +"FAIL" + +00:00:00. --> 00:00:01.000 +"FAIL" + +00:00:00 --> 00:00:01.000 +"FAIL" + +00:00:0 --> 00:00:01.000 +"FAIL" + +00:00: --> 00:00:01.000 +"FAIL" + +00:00 --> 00:00:01.000 +"FAIL" + +00:0 --> 00:00:01.000 +"FAIL" + +00: --> 00:00:01.000 +"FAIL" + +00 --> 00:00:01.000 +"FAIL" + +0 --> 00:00:01.000 +"FAIL" + + --> 00:00:01.000 +"FAIL" + +0:00.000 --> 00:01.000 +"FAIL" + +0000.000 --> 00:01.000 +"FAIL" + +00:0.000 --> 00:01.000 +"FAIL" + +00:00000 --> 00:01.000 +"FAIL" + +00:00.00 --> 00:01.000 +"FAIL" + +00:00.0 --> 00:01.000 +"FAIL" + +00:00. --> 00:01.000 +"FAIL" + +0:00. --> 00:01.000 +"FAIL" + +:00. --> 00:01.000 +"FAIL" + +00. --> 00:01.000 +"FAIL" + +0. --> 00:01.000 +"FAIL" + +. --> 00:01.000 +"FAIL" + +00:00.000 --> 0:01.000 +"FAIL" + +00:00:00.000 --> 0:00:01.000 +{} + |