summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing')
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html96
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/arrows.vtt19
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/cue-counts.json36
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-garbage.vtt5
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-space.vtt4
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-tab.vtt4
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/header-timings.vtt3
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/ids.vtt21
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/newlines.vtt12
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/no-signature.vtt2
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/nulls.vttbin0 -> 2773 bytes
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/omitted-hours.vtt10
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-align.vtt28
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-line.vtt88
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-multiple.vtt16
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-position.vtt40
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-size.vtt37
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/settings-vertical.vtt19
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-bom.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-formfeed.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-lowercase.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-no-newline.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-null.vttbin0 -> 8 bytes
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space-no-newline.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab-no-newline.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-timings.vtt2
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-too-short.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-two-boms.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-websrt.vtt1
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/space-chars.vtt17
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-60.vtt20
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-garbage.vtt190
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-negative.vtt13
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-long.vtt47
-rw-r--r--testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/timings-too-short.vtt98
37 files changed, 838 insertions, 0 deletions
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
new file mode 100644
index 000000000..85669c265
--- /dev/null
+++ b/testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/nulls.vtt
Binary files differ
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
new 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
Binary files differ
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
+{}
+