зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1834803 [wpt PR 40198] - Make popover optional in custom elements reactions test, a=testonly
Automatic update from web-platform-tests Make popover optional in custom elements reactions test See https://github.com/web-platform-tests/wpt/pull/38889#issuecomment-1534764545 -- wpt-commits: 0d9a5c55a3375d70eeef666accea65ea37ccc1e8 wpt-pr: 40198
This commit is contained in:
Родитель
7748b69bd8
Коммит
20984112d5
|
@ -23,7 +23,7 @@ testReflectAttribute('tabIndex', 'tabindex', '0', '1', 'tabIndex on HTMLElement'
|
|||
testReflectAttribute('accessKey', 'accesskey', 'a', 'b', 'accessKey on HTMLElement');
|
||||
testReflectAttributeWithContentValues('draggable', 'draggable', true, 'true', false, 'false', 'draggable on HTMLElement');
|
||||
testReflectAttributeWithContentValues('spellcheck', 'spellcheck', true, 'true', false, 'false', 'spellcheck on HTMLElement');
|
||||
testReflectAttribute('popover', 'popover', 'auto', 'manual', 'popover on HTMLElement');
|
||||
testReflectAttribute('popover', 'popover', 'auto', 'manual', 'popover on HTMLElement', undefined, undefined, () => 'popover' in HTMLElement.prototype);
|
||||
|
||||
testNodeDisconnector(function (customElement) {
|
||||
customElement.parentNode.innerText = '';
|
||||
|
|
|
@ -126,8 +126,11 @@ function testCloner(testFunction, name) {
|
|||
}, name + ' must enqueue an attributeChanged reaction when cloning an element only for observed attributes');
|
||||
}
|
||||
|
||||
function testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name, elementName, interfaceName) {
|
||||
function testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name, elementName, interfaceName, optionalSupportPredicate) {
|
||||
test(function () {
|
||||
if (optionalSupportPredicate) {
|
||||
assert_implements_optional(optionalSupportPredicate());
|
||||
}
|
||||
if (elementName === undefined) {
|
||||
var element = define_new_custom_element([contentAttributeName]);
|
||||
var instance = document.createElement(element.name);
|
||||
|
@ -144,6 +147,9 @@ function testReflectAttributeWithContentValues(jsAttributeName, contentAttribute
|
|||
}, name + ' must enqueue an attributeChanged reaction when adding ' + contentAttributeName + ' content attribute');
|
||||
|
||||
test(function () {
|
||||
if (optionalSupportPredicate) {
|
||||
assert_implements_optional(optionalSupportPredicate());
|
||||
}
|
||||
if (elementName === undefined) {
|
||||
var element = define_new_custom_element([contentAttributeName]);
|
||||
var instance = document.createElement(element.name);
|
||||
|
@ -160,8 +166,8 @@ function testReflectAttributeWithContentValues(jsAttributeName, contentAttribute
|
|||
}, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute');
|
||||
}
|
||||
|
||||
function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name, elementName, interfaceName) {
|
||||
testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name, elementName, interfaceName);
|
||||
function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name, elementName, interfaceName, optionalSupportPredicate) {
|
||||
testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name, elementName, interfaceName, optionalSupportPredicate);
|
||||
}
|
||||
|
||||
function testReflectBooleanAttribute(jsAttributeName, contentAttributeName, name, elementName, interfaceName) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче