mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 78f764c05c229883e87ad135c7153051a66e2851
This commit is contained in:
parent
55347aa39f
commit
bf84a079f9
1983 changed files with 58006 additions and 31437 deletions
|
@ -32,6 +32,12 @@ test(function() {
|
|||
}, description);
|
||||
});
|
||||
});
|
||||
|
||||
test(function() {
|
||||
var audio = new Audio();
|
||||
assert_equals(Object.getPrototypeOf(audio), HTMLAudioElement.prototype);
|
||||
}, "Prototype of object created with named constructor");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError(), function() {
|
||||
Audio();
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="
|
||||
100" height="
|
||||
<canvas id="c" class="output" width="
|
||||
100" height="
|
||||
100"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.whitespace.png" class="output expected" id="expected" alt="">
|
||||
<ul id="d"></ul>
|
||||
|
@ -24,8 +24,8 @@ _addTest(function(canvas, ctx) {
|
|||
_assertSame(canvas.width, 100, "canvas.width", "100");
|
||||
_assertSame(canvas.height, 100, "canvas.height", "100");
|
||||
_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
|
||||
_assertSame(canvas.getAttribute('width'), '\n\t\x0c100', "canvas.getAttribute('width')", "'\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('height'), '\n\t\x0c100', "canvas.getAttribute('height')", "'\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'");
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
var t = async_test("Parsing of non-negative integers in setAttribute");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
canvas.setAttribute('width', '\n\t\x0c100');
|
||||
canvas.setAttribute('height', '\n\t\x0c100');
|
||||
canvas.setAttribute('width', '\r\n\t\x0c100');
|
||||
canvas.setAttribute('height', '\r\n\t\x0c100');
|
||||
_assertSame(canvas.width, 100, "canvas.width", "100");
|
||||
_assertSame(canvas.height, 100, "canvas.height", "100");
|
||||
_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
|
||||
_assertSame(canvas.getAttribute('width'), '\n\t\x0c100', "canvas.getAttribute('width')", "'\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('height'), '\n\t\x0c100', "canvas.getAttribute('height')", "'\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'");
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
Fieldset accessibility tests
|
||||
============================
|
||||
|
||||
These tests are intended to test the accessibility of the fieldset and legend elements.
|
||||
|
||||
To run these tests, open the browser's developer tools and navigate to the Accessibility pane (may
|
||||
need to activate it in Settings), or use an OS-level accessibility inspector, and verify that the
|
||||
accessible name/role matches the expected accessible name/role.
|
||||
|
||||
The following issue discusses ways to automate these tests:
|
||||
|
||||
https://github.com/web-platform-tests/wpt/issues/12791
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: ARIA</title>
|
||||
<div id=fieldset role=group aria-labelledby=legend>
|
||||
<div id=legend>Foo</div>
|
||||
<input>
|
||||
</div>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: baseline</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset -webkit-appearance: none</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { -webkit-appearance: none; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset display: contents</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { display: contents; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset display: none</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { display: none; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected no accessible node for id=fieldset.
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset div display: contents</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
div { display: contents; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<div>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: ""
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset role=none</title>
|
||||
<link rel=help href=http://w3c.github.io/aria/#none>
|
||||
<fieldset id=fieldset role=none>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected no accessible node for id=fieldset.
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset role=presentation</title>
|
||||
<link rel=help href=http://w3c.github.io/aria/#presentation>
|
||||
<fieldset id=fieldset role=presentation>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected no accessible node for id=fieldset.
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset visibility: collapse</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { visibility: collapse; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected no accessible node for id=fieldset.
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: fieldset visibility: hidden</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { visibility: hidden; }
|
||||
legend, input { visibility: visible; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected no accessible node for id=fieldset.
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: flexbox</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { display: flex; }
|
||||
legend { float: left; flex: auto; }
|
||||
input { display: block; flex: auto; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: grid</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
fieldset { display: grid; grid-template-columns: auto auto; }
|
||||
legend { float: left; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: position: absolute legend</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend { position: absolute; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend child display: none</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend > span { display: none; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo<span>Bar</span></legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend visibility: hidden</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend > span { visibility: hidden; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo<span>Bar</span></legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend display: contents</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend { display: contents; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend display: none</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend { display: none; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: ""
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: floating legend</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend { float: left; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend role=group aria-labelledby=fieldset</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<fieldset id=fieldset>
|
||||
<legend role=group aria-labelledby=fieldset>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: ""
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend visibility: collapse</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend { visibility: collapse; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: ""
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: legend visibility: hidden</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<style>
|
||||
legend { visibility: hidden; }
|
||||
</style>
|
||||
<fieldset id=fieldset>
|
||||
<legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: ""
|
|
@ -0,0 +1,10 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: multiple legends</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<fieldset id=fieldset>
|
||||
<div></div>
|
||||
<legend>Foo</legend>
|
||||
<legend>Bar</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: role</title>
|
||||
<fieldset id=fieldset>
|
||||
<legend id=legend>Foo</legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible role for id=fieldset: "group"
|
||||
<p>Expected accessible role for id=legend: No corresponding role
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<title>fieldset accessibility test: shadow DOM</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<template id="my-fieldset">
|
||||
<fieldset id=fieldset>
|
||||
<slot name="my-text"></slot>
|
||||
<input>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
||||
<my-fieldset>
|
||||
<legend slot="my-text">Foo</legend>
|
||||
</my-fieldset>
|
||||
|
||||
<p>Expected accessible name for id=fieldset: ""
|
||||
|
||||
<script>
|
||||
customElements.define('my-fieldset',
|
||||
class extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
const template = document.getElementById('my-fieldset');
|
||||
const templateContent = template.content;
|
||||
|
||||
this.attachShadow({mode: 'open'}).appendChild(
|
||||
templateContent.cloneNode(true)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>fieldset accessibility test: title attribute and empty legend</title>
|
||||
<link rel=help href=https://w3c.github.io/html-aam/#fieldset-element-accessible-name-computation>
|
||||
<fieldset id=fieldset title="Foo">
|
||||
<legend></legend>
|
||||
<input>
|
||||
</fieldset>
|
||||
<p>Expected accessible name for id=fieldset: "Foo"
|
|
@ -127,4 +127,9 @@
|
|||
assert_false(option.selected);
|
||||
}, "Option constructor does not set dirtiness (so, manipulating the selected content attribute still updates the " +
|
||||
"selected IDL attribute)");
|
||||
|
||||
test(function() {
|
||||
var option = new Option();
|
||||
assert_equals(Object.getPrototypeOf(option), HTMLOptionElement.prototype);
|
||||
}, "Prototype of object created with named constructor");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue