mirror of
https://github.com/servo/servo.git
synced 2025-08-29 17:18:23 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -3,6 +3,7 @@
|
|||
<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-align">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=common.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function(){
|
||||
|
@ -56,10 +57,10 @@ t_parsed.step(function(){
|
|||
t.onerror = this.step_func(function() {
|
||||
assert_unreached('got error event');
|
||||
});
|
||||
t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 align:start\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 align:center\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 align:end\ntest');
|
||||
t.src = make_vtt_track('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 align:start\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 align:center\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 align:end\ntest', this);
|
||||
t.track.mode = 'showing';
|
||||
video.appendChild(t);
|
||||
});
|
||||
|
|
8
tests/wpt/web-platform-tests/webvtt/api/VTTCue/common.js
Normal file
8
tests/wpt/web-platform-tests/webvtt/api/VTTCue/common.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
function make_vtt_track(contents, test) {
|
||||
var track_blob = new Blob([contents], { type: 'text/vtt' });
|
||||
var track_url = URL.createObjectURL(track_blob);
|
||||
test.add_cleanup(function() {
|
||||
URL.revokeObjectURL(track_url);
|
||||
});
|
||||
return track_url;
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-line">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=common.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function(){
|
||||
|
@ -55,9 +56,9 @@ t_parsed.step(function(){
|
|||
t.onerror = this.step_func(function() {
|
||||
assert_unreached('got error event');
|
||||
});
|
||||
t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0%\ntest');
|
||||
t.src = make_vtt_track('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0%\ntest', this);
|
||||
t.track.mode = 'showing';
|
||||
video.appendChild(t);
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-snaptolines">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=common.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
setup(function(){
|
||||
|
@ -90,9 +91,9 @@ t_parsed.step(function(){
|
|||
t.onerror = this.step_func(function() {
|
||||
assert_unreached('got error event');
|
||||
});
|
||||
t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0%\ntest');
|
||||
t.src = make_vtt_track('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 line:0%\ntest', this);
|
||||
t.track.mode = 'showing';
|
||||
video.appendChild(t);
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-text">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=common.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
setup(function(){
|
||||
|
@ -32,8 +33,8 @@ t_parsed.step(function(){
|
|||
t.onerror = this.step_func(function() {
|
||||
assert_unreached('got error event');
|
||||
});
|
||||
t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\n'+
|
||||
'\n\nfoobar\n00:00:00.000 --> 00:00:00.001\ntest');
|
||||
t.src = make_vtt_track('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\n'+
|
||||
'\n\nfoobar\n00:00:00.000 --> 00:00:00.001\ntest', this);
|
||||
t.track.mode = 'showing';
|
||||
video.appendChild(t);
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-vertical">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=common.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
setup(function(){
|
||||
|
@ -47,9 +48,9 @@ t_parsed.step(function(){
|
|||
t.onerror = this.step_func(function() {
|
||||
assert_unreached('got error event');
|
||||
});
|
||||
t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 vertical:rl\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 vertical:lr\ntest');
|
||||
t.src = make_vtt_track('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 vertical:rl\ntest\n\n'+
|
||||
'00:00:00.000 --> 00:00:00.001 vertical:lr\ntest', this);
|
||||
t.track.mode = 'showing';
|
||||
video.appendChild(t);
|
||||
});
|
||||
|
|
21
tests/wpt/web-platform-tests/webvtt/api/VTTRegion/id.html
Normal file
21
tests/wpt/web-platform-tests/webvtt/api/VTTRegion/id.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<title>VTTRegion.id</title>
|
||||
<link rel="help" href="https://w3c.github.io/webvtt/#dom-vttregion-id">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var region = new VTTRegion();
|
||||
assert_true('id' in region, 'id is not supported');
|
||||
|
||||
assert_equals(region.id, '', 'initial value');
|
||||
|
||||
region.id = '1';
|
||||
assert_equals(region.id, '1', 'value after setting to "1"');
|
||||
|
||||
region.id = '';
|
||||
assert_equals(region.id, '', 'value after setting to the empty string');
|
||||
|
||||
}, document.title + ' script-created region');
|
||||
</script>
|
35
tests/wpt/web-platform-tests/webvtt/api/historical.html
Normal file
35
tests/wpt/web-platform-tests/webvtt/api/historical.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<title>Historical WebVTT APIs must not be supported</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
// Also see /html/semantics/embedded-content/media-elements/historical.html
|
||||
|
||||
[
|
||||
// https://github.com/w3c/webvtt/pull/31
|
||||
['VTTCue', 'regionId'],
|
||||
['TextTrack', 'regions'],
|
||||
['TextTrack', 'addRegion'],
|
||||
['TextTrack', 'removeRegion'],
|
||||
['VTTRegion', 'track'],
|
||||
// id re-introduced in https://github.com/w3c/webvtt/pull/349/files
|
||||
|
||||
].forEach(function(feature) {
|
||||
var interf = feature[0];
|
||||
var member = feature[1];
|
||||
test(function() {
|
||||
assert_true(interf in window, interf + ' is not supported');
|
||||
assert_false(member in window[interf].prototype);
|
||||
}, interf + ' ' + member + ' member must be nuked');
|
||||
});
|
||||
|
||||
[
|
||||
// https://github.com/w3c/webvtt/pull/31
|
||||
'VTTRegionList',
|
||||
|
||||
].forEach(function(interf) {
|
||||
test(function() {
|
||||
assert_false(interf in window);
|
||||
}, interf + ' interface must be nuked');
|
||||
});
|
||||
</script>
|
|
@ -123,7 +123,8 @@ enum DirectionSetting { "" /* horizontal */, "rl", "lr" };
|
|||
enum LineAlignSetting { "start", "center", "end" };
|
||||
enum PositionAlignSetting { "line-left", "center", "line-right", "auto" };
|
||||
enum AlignSetting { "start", "center", "end", "left", "right" };
|
||||
[Constructor(double startTime, double endTime, DOMString text)]
|
||||
[Exposed=Window,
|
||||
Constructor(double startTime, double endTime, DOMString text)]
|
||||
interface VTTCue : TextTrackCue {
|
||||
attribute VTTRegion? region;
|
||||
attribute DirectionSetting vertical;
|
||||
|
@ -139,8 +140,10 @@ interface VTTCue : TextTrackCue {
|
|||
};
|
||||
|
||||
enum ScrollSetting { "" /* none */, "up" };
|
||||
[Constructor]
|
||||
[Exposed=Window,
|
||||
Constructor]
|
||||
interface VTTRegion {
|
||||
attribute DOMString id;
|
||||
attribute double width;
|
||||
attribute long lines;
|
||||
attribute double regionAnchorX;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue