diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-positioning.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-positioning.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-positioning.html b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-positioning.html new file mode 100644 index 0000000000..d14a5768d3 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-positioning.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<title>Cue text position from settings</title> +<script src="track-helpers.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +check_cues_from_track("resources/positioning.vtt", testTrack); +check_cues_from_track("resources/positioning-ltr.vtt", testTrack); + +check_cues_from_track("resources/positioning-bad.vtt", function(track) { + var expected = [ + { position: "auto" }, + { position: "auto" }, + { position: "auto" }, + { position: "auto" }, + { position: "auto" }, + { position: "auto" }, + { position: "auto" }, + { position: "auto" } + ]; + + assert_cues_match(track.cues, expected); +}); + +function testTrack(track) { + var expected = [ + { position: 0 }, + { position: 50 }, + { position: "auto" }, + { position: 100 } + ]; + + assert_cues_match(track.cues, expected); +} +</script>
\ No newline at end of file |