зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1552197 [wpt PR 16853] - Update error type test for attachShadow(), a=testonly
Automatic update from web-platform-tests Update error type test for attachShadow() Follows https://github.com/whatwg/dom/pull/761. -- wp5At-commits: 7deb0225341a149c78db1d4515314e781985b3ff wpt-pr: 16853
This commit is contained in:
Родитель
8807701a11
Коммит
b88396557c
|
@ -53,30 +53,30 @@ test(function () {
|
|||
}, 'Element.attachShadow must create an instance of ShadowRoot');
|
||||
|
||||
test(function () {
|
||||
assert_throws({'name': 'InvalidStateError'}, function () {
|
||||
assert_throws({'name': 'NotSupportedError'}, function () {
|
||||
var div = document.createElement('div');
|
||||
div.attachShadow({mode: "open"});
|
||||
div.attachShadow({mode: "open"});
|
||||
}, 'Calling attachShadow({mode: "open"}) twice on the same element must throw');
|
||||
|
||||
assert_throws({'name': 'InvalidStateError'}, function () {
|
||||
assert_throws({'name': 'NotSupportedError'}, function () {
|
||||
var div = document.createElement('div');
|
||||
div.attachShadow({mode: "closed"});
|
||||
div.attachShadow({mode: "closed"});
|
||||
}, 'Calling attachShadow({mode: "closed"}) twice on the same element must throw');
|
||||
|
||||
assert_throws({'name': 'InvalidStateError'}, function () {
|
||||
assert_throws({'name': 'NotSupportedError'}, function () {
|
||||
var div = document.createElement('div');
|
||||
div.attachShadow({mode: "open"});
|
||||
div.attachShadow({mode: "closed"});
|
||||
}, 'Calling attachShadow({mode: "closed"}) after attachShadow({mode: "open"}) on the same element must throw');
|
||||
|
||||
assert_throws({'name': 'InvalidStateError'}, function () {
|
||||
assert_throws({'name': 'NotSupportedError'}, function () {
|
||||
var div = document.createElement('div');
|
||||
div.attachShadow({mode: "closed"});
|
||||
div.attachShadow({mode: "open"});
|
||||
}, 'Calling attachShadow({mode: "open"}) after attachShadow({mode: "closed"}) on the same element must throw');
|
||||
}, 'Element.attachShadow must throw a InvalidStateError if the context object already hosts a shadow tree');
|
||||
}, 'Element.attachShadow must throw a NotSupportedError if the context object already hosts a shadow tree');
|
||||
|
||||
test(function () {
|
||||
for (var elementName of ATTACHSHADOW_DISALLOWED_ELEMENTS) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче