Skip to content

Commit

Permalink
Bug 1534801 [wpt PR 15740] - Add tests for 'form-associated custom el…
Browse files Browse the repository at this point in the history
…ements', a=testonly

Automatic update from web-platform-tests
Add tests for form-associated custom elements

This is for WICG/webcomponents#187.

Specification PR: whatwg/html#4383.
--

wp5At-commits: 3ccd79e32ced5ddab58f52e79f982d2ebfc7f98c
wpt-pr: 15740

UltraBlame original commit: 10764d9717ef7db00aa99d016a50f282e0d9d7b1
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent 42313a7 commit 295d928
Show file tree
Hide file tree
Showing 9 changed files with 8,781 additions and 0 deletions.
767 changes: 767 additions & 0 deletions testing/web-platform/tests/custom-elements/CustomElementRegistry.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
<
!
DOCTYPE
html
>
<
body
>
<
script
src
=
"
/
resources
/
testharness
.
js
"
>
<
/
script
>
<
script
src
=
"
/
resources
/
testharnessreport
.
js
"
>
<
/
script
>
<
script
>
test
(
(
)
=
>
{
class
NotFormAssociatedElement
extends
HTMLElement
{
}
customElements
.
define
(
'
my
-
element1
'
NotFormAssociatedElement
)
;
const
element
=
new
NotFormAssociatedElement
(
)
;
const
i
=
element
.
attachInternals
(
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
setFormValue
(
'
'
)
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
form
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
setValidity
(
{
}
)
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
willValidate
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
validity
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
validationMessage
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
checkValidity
(
)
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
reportValidity
(
)
)
;
assert_throws
(
'
NotSupportedError
'
(
)
=
>
i
.
labels
)
;
}
'
Form
-
related
operations
and
attributes
should
throw
NotSupportedErrors
'
+
'
for
non
-
form
-
associated
custom
elements
.
'
)
;
<
/
script
>
<
/
body
>
Loading

0 comments on commit 295d928

Please sign in to comment.