Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing in all browsers test in dom/nodes/Element-matches.html #11212

Closed
domenic opened this issue May 29, 2018 · 6 comments
Closed

Failing in all browsers test in dom/nodes/Element-matches.html #11212

domenic opened this issue May 29, 2018 · 6 comments
Labels

Comments

@domenic
Copy link
Member

domenic commented May 29, 2018

In-document Element.matches: Universal selector, matching all descendants of the specified reference element (with refNode Element): * in https://wpt.fyi/results/dom/nodes/Element-matches.html seems suspicious.

@domenic
Copy link
Member Author

domenic commented May 29, 2018

Same problem with the sibling file, Element-webkitMatchesSelector.html

@foolip foolip added the dom label May 29, 2018
@foolip
Copy link
Member

foolip commented May 29, 2018

Source is here:

{name: "Universal selector, matching all descendants of the specified reference element", selector: "*", ctx: "#universal", expect: ["universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1",

This was last touched by @Ms2ger in 6ceec43, ages ago.

@foolip
Copy link
Member

foolip commented May 29, 2018

Actually, it's

{name: "Universal selector, matching all descendants of the specified reference element", selector: "*", ctx: "#universal", expect: ["universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1",

Don't know how I ended up at that older commit through the GitHub UI...

@Ms2ger
Copy link
Contributor

Ms2ger commented May 29, 2018

Possibly related: #1577

This is more of a Selectors test; cc @tabatkins @fantasai

@foolip
Copy link
Member

foolip commented May 29, 2018

A problem I noticed trying to debug this is that selectors.js is written as if element.matches can still take more than one argument, with this bit of comment:

 * expect.matches(selector, context)    // Only where refNodes is not specified
 * expect.matches(selector, refNodes)
 * expect.matches(selector)             // Only if neither context nor refNodes is specified

And it's written to test find() and findAll(), which never came to be.

@foolip
Copy link
Member

foolip commented May 29, 2018

Those APIs turned into query() and queryAll(), now tracked in whatwg/dom#586 and commented out in the spec.

foolip added a commit that referenced this issue May 29, 2018
The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes #11212.
foolip added a commit that referenced this issue Jun 18, 2018
The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes #11212.
foolip added a commit that referenced this issue Jun 18, 2018
The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes #11212.
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 11, 2018
…est so that it works, a=testonly

Automatic update from web-platform-testsMove and simplify element.matches("*") test so that it works (#11229)

The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes web-platform-tests/wpt#11212.
--

wpt-commits: 7c0611d2ea5792fa8d9829d05aff1ab7fa648c67
wpt-pr: 11229
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…est so that it works, a=testonly

Automatic update from web-platform-testsMove and simplify element.matches("*") test so that it works (#11229)

The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes web-platform-tests/wpt#11212.
--

wpt-commits: 7c0611d2ea5792fa8d9829d05aff1ab7fa648c67
wpt-pr: 11229

UltraBlame original commit: f683999cbef1b9561302c4d5452a100cbd47de99
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
…est so that it works, a=testonly

Automatic update from web-platform-testsMove and simplify element.matches("*") test so that it works (#11229)

The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes web-platform-tests/wpt#11212.
--

wpt-commits: 7c0611d2ea5792fa8d9829d05aff1ab7fa648c67
wpt-pr: 11229

UltraBlame original commit: f683999cbef1b9561302c4d5452a100cbd47de99
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…est so that it works, a=testonly

Automatic update from web-platform-testsMove and simplify element.matches("*") test so that it works (#11229)

The reason it didn't work before was because in Element-matches.js,
it's always `someElement.matches("*")` being tested, which is the only
thing that could be tested as there's not other "context" or
"reference node" involved in the API surface.

All of TEST_FIND is actually dead code, so dropping that is harmless.

Fixes web-platform-tests/wpt#11212.
--

wpt-commits: 7c0611d2ea5792fa8d9829d05aff1ab7fa648c67
wpt-pr: 11229

UltraBlame original commit: f683999cbef1b9561302c4d5452a100cbd47de99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants