Web Platform Tests and WebVTT

https://slides.com/gkatsev/wpt-webvtt/

WPT

The web-platform-tests Project is a W3C-coordinated attempt to build a cross-browser testsuite for the Web-platform stack.

https://github.com/web-platform-tests/wpt

test(function() {
    var cue = new VTTCue(3, 12, 'foo bar');

    assert_equals(cue.startTime, 3);
    assert_equals(cue.endTime, 12);
    assert_equals(cue.text, 'foo bar');
    assert_equals(cue.id, '');
    assert_equals(cue.region, null);
    assert_equals(cue.pauseOnExit, false);
    assert_equals(cue.snapToLines, true);
    assert_equals(cue.line, 'auto');
    assert_equals(cue.lineAlign, 'start');
    assert_equals(cue.position, 'auto');
    assert_equals(cue.positionAlign, 'auto');
    assert_equals(cue.size, 100);
    assert_equals(cue.align, 'center');
}, document.title + ', initial values');

http://w3c-test.org/webvtt/api/VTTCue/constructor.html

w3c-test.org

Running Locally

  • virtualenv
  • pip

Hostsfiles

gasmask

https://github.com/2ndalpha/gasmask

127.0.0.1	xn--lve-6lad.not-web-platform.test
127.0.0.1	xn--lve-6lad.web-platform.test
127.0.0.1	xn--n8j6ds53lwwkrqhv28a.not-web-platform.test
127.0.0.1	www1.web-platform.test
127.0.0.1	www2.web-platform.test
127.0.0.1	not-web-platform.test
127.0.0.1	web-platform.test
127.0.0.1	www2.not-web-platform.test
127.0.0.1	www1.not-web-platform.test
127.0.0.1	www.not-web-platform.test
127.0.0.1	www.web-platform.test
127.0.0.1	xn--n8j6ds53lwwkrqhv28a.web-platform.test

./wpt serve

./wpt run --headless --log-html log.html chrome webvtt

WebVTT

http://wpt.fyi

WebVTT

API tests

VTTCue

VTTRegion

Parsing

iOS and Android

Match Safari and Chrome

Edge

Still no VTTCue!

Regions?

Create tests

Adopt WebVTT

WPT and WebVTT

By Gary Katsevman

WPT and WebVTT

  • 565