mirror of
https://github.com/servo/servo.git
synced 2025-08-24 22:58:21 +01:00
Update web-platform-tests to revision 8fde342d6e62e9820f2c19db634b99b78df796fa
This commit is contained in:
parent
db29cb01b0
commit
e9a369631b
48 changed files with 1012 additions and 283 deletions
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Custom Elements: CEReactions on HTMLMeterElement interface</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<meta name="assert" content="value, min, max, low, high, optimum of
|
||||
HTMLMeterElement interface must have CEReactions">
|
||||
<meta name="help" content="https://html.spec.whatwg.org/#the-meter-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/custom-elements-helpers.js"></script>
|
||||
<script src="./resources/reactions.js"></script>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
|
||||
function getParentElement() {
|
||||
return document.body;
|
||||
}
|
||||
|
||||
function setAttributes(instance) {
|
||||
instance.setAttribute('value', '0.6');
|
||||
}
|
||||
|
||||
testReflectAttribute(
|
||||
'value', 'value', '0.3',
|
||||
'0.4', 'value on HTMLMeterElement', 'meter',
|
||||
HTMLMeterElement
|
||||
);
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'min', 'min', '0.1',
|
||||
'0.2', 'min on HTMLMeterElement', 'meter',
|
||||
getParentElement, instance => setAttributes(instance), HTMLMeterElement
|
||||
);
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'max', 'max', '2',
|
||||
'3', 'max on HTMLMeterElement', 'meter',
|
||||
getParentElement, instance => setAttributes(instance), HTMLMeterElement
|
||||
);
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'low', 'low', '0.1',
|
||||
'0.2', 'low on HTMLMeterElement', 'meter',
|
||||
getParentElement, instance => setAttributes(instance), HTMLMeterElement
|
||||
);
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'high', 'high', '2',
|
||||
'3', 'high on HTMLMeterElement', 'meter',
|
||||
getParentElement, instance => setAttributes(instance), HTMLMeterElement
|
||||
);
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'optimum', 'optimum', '0.3',
|
||||
'0.4', 'optimum on HTMLMeterElement', 'meter',
|
||||
getParentElement, instance => setAttributes(instance), HTMLMeterElement
|
||||
);
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Custom Elements: CEReactions on HTMLOptGroupElement interface</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<meta name="assert" content="disabled, label of
|
||||
HTMLOptGroupElement interface must have CEReactions">
|
||||
<meta name="help" content="https://html.spec.whatwg.org/#the-optgroup-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/custom-elements-helpers.js"></script>
|
||||
<script src="./resources/reactions.js"></script>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
|
||||
function getParentElement() {
|
||||
let element = document.createElement('select');
|
||||
document.body.appendChild(element);
|
||||
return element;
|
||||
}
|
||||
|
||||
function setAttributes(instance) {
|
||||
instance.setAttribute('label', 'group1');
|
||||
}
|
||||
|
||||
testReflectBooleanAttributeWithDependentAttributes(
|
||||
'disabled', 'disabled', 'disabled on HTMLOptGroupElement',
|
||||
'optgroup', getParentElement, instance => setAttributes(instance),
|
||||
HTMLOptGroupElement
|
||||
);
|
||||
|
||||
testReflectAttributeWithParentNode(
|
||||
'label', 'label', 'group1',
|
||||
'group2', 'label on HTMLOptGroupElement', 'optgroup',
|
||||
getParentElement, HTMLOptGroupElement
|
||||
);
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Custom Elements: CEReactions on HTMLParamElement interface</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<meta name="assert" content="name, value of HTMLParamElement
|
||||
interface must have CEReactions">
|
||||
<meta name="help" content="https://html.spec.whatwg.org/#the-param-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/custom-elements-helpers.js"></script>
|
||||
<script src="./resources/reactions.js"></script>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
|
||||
function getParentElement() {
|
||||
let element = document.createElement('object');
|
||||
element['type'] = 'image/png';
|
||||
element['data'] = '/images/blue.png';
|
||||
document.body.appendChild(element);
|
||||
return element;
|
||||
}
|
||||
|
||||
function setAttributes(instance, attribute, value) {
|
||||
instance.setAttribute(attribute, value);
|
||||
}
|
||||
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'name', 'name', 'image1',
|
||||
'image2', 'name on HTMLParamElement', 'param',
|
||||
getParentElement, instance => setAttributes(instance, 'value', 'blue'),
|
||||
HTMLParamElement
|
||||
);
|
||||
testReflectAttributeWithDependentAttributes(
|
||||
'value', 'value', 'blue1',
|
||||
'blue2', 'value on HTMLParamElement', 'param',
|
||||
getParentElement, instance => setAttributes(instance, 'name', 'image'),
|
||||
HTMLParamElement
|
||||
);
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Custom Elements: CEReactions on HTMLProgressElement interface</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<meta name="assert" content="value, max of HTMLProgressElement
|
||||
interface must have CEReactions">
|
||||
<meta name="help" content="https://html.spec.whatwg.org/#the-progress-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/custom-elements-helpers.js"></script>
|
||||
<script src="./resources/reactions.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
testReflectAttribute(
|
||||
'value', 'value', '0.15',
|
||||
'0.2', 'value on HTMLProgressElement', 'progress',
|
||||
HTMLProgressElement
|
||||
);
|
||||
testReflectAttribute(
|
||||
'max', 'max', '2',
|
||||
'4', 'max on HTMLProgressElement', 'progress',
|
||||
HTMLProgressElement
|
||||
);
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue