Skip to content

Commit

Permalink
Bug 1622229 [wpt PR 22236] - Correctly test document.all quirks, a=te…
Browse files Browse the repository at this point in the history
…stonly

Automatic update from web-platform-tests
Correctly test document.all quirks

For legacy compatibility, this property is specified with some willful
violations of JS: <https://html.spec.whatwg.org/#dom-document-all>.
Prior to this commit, idlharness wasn't accounting for these, so
html/dom/interfaces.html was wrong for document.all/HTMLAllCollection
tests.

It's a bit ugly to include this directly in idlharness.js and
testharness.js, but it's the cleanest solution I can think of.

Fixes #4207.

--

wpt-commits: 687b92d025e32df7f5217bc06b0e510a39953ef9
wpt-pr: 22236

UltraBlame original commit: 65eedd9b56ee16dc1b0f23ad5835cb7805dd2d94
  • Loading branch information
marco-c committed Mar 16, 2020
1 parent d27fb95 commit 528bb73
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 2 deletions.
87 changes: 85 additions & 2 deletions testing/web-platform/tests/resources/idlharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -22923,7 +22923,38 @@ e
}
var
expected_typeof
;
if
(
this
.
name
=
=
"
HTMLAllCollection
"
)
{
/
/
Willful
violation
of
JS
.
:
(
expected_typeof
=
"
undefined
"
;
}
else
if
(
this
.
members
Expand All @@ -22942,15 +22973,24 @@ legacycaller
;
}
)
?
)
{
expected_typeof
=
"
function
"
:
;
}
else
{
expected_typeof
=
"
object
"
;
}
this
.
test_primary_interface_of
Expand Down Expand Up @@ -24257,6 +24297,48 @@ if
thrown
)
{
if
(
this
.
name
=
=
"
Document
"
&
&
member
.
name
=
=
"
all
"
)
{
/
/
Willful
violation
of
JS
:
(
assert_equals
(
typeof
property
"
undefined
"
)
;
}
else
{
this
.
array
Expand All @@ -24271,6 +24353,7 @@ idlType
;
}
}
}
if
(
member
Expand Down
24 changes: 24 additions & 0 deletions testing/web-platform/tests/resources/testharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -10099,6 +10099,30 @@ object
"
function
"
|
|
/
/
Willful
violation
of
JS
.
:
(
String
(
object
)
=
=
=
"
[
object
HTMLAllCollection
]
"
name
description
"
Expand Down

0 comments on commit 528bb73

Please sign in to comment.