Update web-platform-tests to revision 3b3585e368841b77caea8576fa56cef91c3fbdf0

This commit is contained in:
Ms2ger 2016-09-26 10:52:50 +02:00
parent d00639c55f
commit 3b4f0ec0bb
541 changed files with 14609 additions and 3288 deletions

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Audio Test: audio_loop_current_media_controller</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-media-loop" />
<meta name="flags" content="" />
<meta name="assert" content="Check if the audio element has a current media controller that expecting the loop attribute has no effect" />
<script src="/common/media.js"></script>
</head>
<body>
<p>Test passes if the audio doesn't repeatly play and the text 'The user agent doesn't support media element.' does not appear anywhere on this page</p>
<audio id="m" controls loop mediagroup="movie">The user agent doesn't support media element.</audio>
<script type="text/javascript">
var media = document.getElementById("m");
var controller = new MediaController();
media.controller = controller;
media.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
media.play();
</script>
</body>
</html>

View file

@ -42,4 +42,12 @@ test(function() {
new TextTrackCue(0, 0, '');
});
}, 'TextTrackCue constructor should not be supported');
// added in https://github.com/whatwg/html/commit/66c5b32240c202c74f475872e7ea2cd163777b4a
// removed in https://github.com/whatwg/html/commit/634698e70ea4586d58c989fa7d2cbfcad20d33e6
t('mediaGroup');
t('controller');
test(function() {
assert_false('MediaController' in window);
}, 'MediaController constructor should not be supported');
</script>

View file

@ -5,73 +5,39 @@
<div id=log></div>
<script>
test(function(){
var track = document.createElement('track');
assert_equals(track.src, '');
assert_equals(track.getAttribute('src'), null);
var track = document.createElement('track');
assert_equals(track.src, '');
assert_equals(track.getAttribute('src'), null);
}, document.title + ' missing value');
test(function(){
var track = document.createElement('track');
track.setAttribute('src', '');
assert_equals(track.src, '');
assert_equals(track.getAttribute('src'), '');
}, document.title + ' empty string in content attribute');
function resolve(url) {
var link = document.createElement('a');
link.setAttribute('href', url);
return link.href;
}
test(function(){
var track = document.createElement('track');
track.src = '';
assert_equals(track.src, '');
assert_equals(track.getAttribute('src'), '');
}, document.title + ' empty string in IDL attribute');
var tests = [
{input:'', expectedIDL:resolve(''), desc:'empty string'},
{input:'http://foo bar', expectedIDL:'http://foo bar', desc:'unresolvable value'},
{input:'test', expectedIDL:resolve('test'), desc:'resolvable value'},
// Leading and trailing C0 controls and space is stripped per url spec.
{input:'\u0000', expectedIDL:resolve(''), desc:'\\u0000'},
{input:'foo\u0000bar', expectedIDL:resolve('foo%00bar'), desc:'foo\\u0000bar'},
];
test(function(){
var track = document.createElement('track');
track.setAttribute('src', 'http://foo bar');
assert_equals(track.src, 'http://foo bar');
assert_equals(track.getAttribute('src'), 'http://foo bar');
}, document.title + ' unresolvable value in content attribute');
test(function(){
var track = document.createElement('track');
track.setAttribute('src', 'test');
var link = document.createElement('a');
link.setAttribute('href', 'test');
assert_equals(track.src, link.href);
assert_equals(track.getAttribute('src'), 'test');
}, document.title + ' resolvable value in content attribute');
test(function(){
var track = document.createElement('track');
track.setAttribute('src', '\u0000');
var link = document.createElement('a');
link.setAttribute('href', '%00');
assert_equals(track.src, link.href);
assert_equals(track.getAttribute('src'), '\u0000');
}, document.title + ' \\u0000 in content attribute');
test(function(){
var track = document.createElement('track');
track.src = 'http://foo bar';
assert_equals(track.src, 'http://foo bar');
assert_equals(track.getAttribute('src'), 'http://foo bar');
}, document.title + ' assigning unresolvable value to IDL attribute');
test(function(){
var track = document.createElement('track');
track.src = 'test';
var link = document.createElement('a');
link.setAttribute('href', 'test');
assert_equals(track.src, link.href);
assert_equals(track.getAttribute('src'), 'test');
}, document.title + ' assigning resolvable value to IDL attribute');
test(function(){
var track = document.createElement('track');
track.src = '\u0000';
var link = document.createElement('a');
link.setAttribute('href', '%00');
assert_equals(track.src, link.href);
assert_equals(track.getAttribute('src'), '\u0000');
}, document.title + ' assigning \\u0000 to IDL attribute');
tests.forEach(function(t) {
test(function(){
var track = document.createElement('track');
track.setAttribute('src', t.input);
assert_equals(track.src, t.expectedIDL);
assert_equals(track.getAttribute('src'), t.input);
}, [document.title, t.desc, 'in content attribute'].join(' '));
test(function(){
var track = document.createElement('track');
track.src = t.input;
assert_equals(track.src, t.expectedIDL);
assert_equals(track.getAttribute('src'), t.input);
}, [document.title, 'assigning', t.desc, 'to IDL attribute'].join(' '));
});
</script>

View file

@ -10,14 +10,6 @@ test(function() {
assert_equals(v.currentTime, 0);
}, 'currentTime initial value');
test(function() {
var v = document.createElement('video');
v.controller = new MediaController();
assert_true(v.controller instanceof MediaController);
assert_throws('InvalidStateError', function() { v.currentTime = 1; });
assert_false(v.seeking);
}, 'setting currentTime with a media controller present');
test(function() {
var v = document.createElement('video');
assert_equals(v.readyState, v.HAVE_NOTHING);

View file

@ -1,27 +0,0 @@
<!doctype html>
<title>MediaController events task source</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
async_test(function(t) {
// Both MediaControllers should use the DOM manipulation task source, so the
// events should fire in the same order as the attributes are modified.
var mc1 = new MediaController();
var mc2 = new MediaController();
mc1.volume = 0;
mc2.volume = 0;
mc1.volume = 1;
mc2.volume = 1;
var targets = [];
var callback = t.step_func(function(event) {
targets.push(event.target);
if (targets.length == 4) {
assert_array_equals(targets, [mc1, mc2, mc1, mc2]);
t.done();
}
});
mc1.addEventListener('volumechange', callback);
mc2.addEventListener('volumechange', callback);
});
</script>

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Video Test: video_loop_current_media_controller</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-media-loop" />
<meta name="flags" content="" />
<meta name="assert" content="Check if the video element has a current media controller that expecting the loop attribute has no effect" />
<script src="/common/media.js"></script>
</head>
<body>
<p>Test passes if the video doesn't repeatly play and the text 'The user agent doesn't support media element.' does not appear anywhere on this page</p>
<video id="m" controls loop mediagroup="movie">The user agent doesn't support media element.</video>
<script type="text/javascript">
var media = document.getElementById("m");
var controller = new MediaController();
media.controller = controller;
media.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
media.play();
</script>
</body>
</html>

View file

@ -20,6 +20,9 @@ var tests = [
{desc: 'empty string', shape: 'default', coords: "", hit: hitAll},
{desc: 'omitted coords', shape: 'DEFAULT', coords: null, hit: hitAll},
{desc: 'simple', shape: 'rect', coords: "2,2,10,10", hit: hitRect},
{desc: 'simple', shape: 'rectangle', coords: "2,2,10,10", hit: hitRect},
{desc: 'simple', shape: 'circle', coords: "20,40,10", hit: hitCircle},
{desc: 'simple', shape: 'circ', coords: "20,40,10", hit: hitCircle},
{desc: 'simple', shape: 'CIRCLE', coords: "20,40,10", hit: hitCircle},

View file

@ -5,13 +5,73 @@
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
var canvas;
var canvas, context;
setup(function() {
canvas = document.createElement("canvas");
context = canvas.getContext('2d');
path2d = new Path2D();
});
["supportsContext", "probablySupportsContext"].forEach(function(m) {
function t(member, obj) {
var name = obj === canvas ? "Canvas" : String(obj).match(/\[object (\S+)\]/)[1];
test(function() {
assert_false(m in canvas);
}, "Canvas support for " + m);
});
assert_false(member in obj);
}, name + " support for " + member);
}
// added in https://github.com/whatwg/html/commit/0ecbf0e010df16d9c6d11eef6b2c58419158c4da
// renamed in https://github.com/whatwg/html/commit/2542a12cb25ee93534cbed1f31b5e1bc05fcdd0e
t("supportsContext", canvas);
// removed in https://github.com/whatwg/html/commit/2cfb8e3f03d3166842d2ad0f661459d26e2a40eb
t("probablySupportsContext", canvas);
// removed in https://github.com/whatwg/html/commit/ef72f55da4acdf266174225c6ca8bf2a650d0219
t("width", context);
t("height", context);
// removed in https://github.com/whatwg/html/commit/740634d0f30a3b76e9da166ac2fa8835fcc073ab
t("setContext", canvas);
t("transferControlToProxy", canvas);
t("CanvasProxy", window);
t("commit", canvas);
test(function() {
assert_throws(new TypeError(), function() {
new CanvasRenderingContext2D();
}, 'no arguments');
assert_throws(new TypeError(), function() {
new CanvasRenderingContext2D(1, 1);
}, 'with arguments');
}, "CanvasRenderingContext2D constructors");
// removed in https://github.com/whatwg/html/commit/e1d04f49a38e2254a783c28987457a95a47d9511
t("addPathByStrokingPath", path2d);
t("addText", path2d);
t("addPathByStrokingText", path2d);
// renamed in https://github.com/whatwg/html/commit/fcb0756dd94d96df9b8355741d82fcd5ca0a6154
test(function() {
var canvas = document.createElement('canvas');
var context = canvas.getContext('bitmaprenderer');
if (context) {
assert_false('transferImageBitmap' in context);
}
}, 'ImageBitmapRenderingContext support for transferImageBitmap');
// renamed in https://github.com/whatwg/html/commit/3aec2a7e04a3402201afd29c224b57fa54497517
t('Path', window);
// removed in https://github.com/whatwg/html/commit/d5759b0435091e4858c9bff90319cbe5b040eda2
t('toDataURLHD', canvas);
t('toBlobHD', canvas);
t('createImageDataHD', context);
t('getImageDataHD', context);
t('putImageDataHD', context);
test(function() {
if ('ImageData' in window) {
assert_false('resolution' in new ImageData(1, 1));
}
}, 'ImageData support for resolution');
// dropped/renamed in https://github.com/whatwg/html/commit/ff07c6d630fb986f6c4f64b2fb87387b4f89647d
t('drawSystemFocusRing', context);
t('drawCustomFocusRing', context);
</script>

View file

@ -0,0 +1,16 @@
<!doctype html>
<title>Historical iframe element features should not be supported</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
function t(property) {
test(function() {
assert_false(property in document.createElement('iframe'));
}, 'iframe.' + property + ' should not be supported');
}
// added in https://github.com/whatwg/html/commit/f6490f17f577fa3478791b29ad8c2b586418001f
// removed in https://github.com/whatwg/html/commit/1490eba4dba5ab476f0981443a86c01acae01311
t('seamless');
</script>