Repository navigation
test(css): nothing ran the web-platform-tests selector cases - #105
Merged
Merged
Conversation
Syncs Netweir c9368c0 (netweir/netweir#339): WPT's dom/nodes selector suite and the static css/selectors cases run in cargo test, 1,719 and 461 passing with none failing, and every skipped case has its reason. It also brings the fixes those cases found: pseudo-elements parse and match nothing, as in querySelector; :heading; end of input closes an unfinished selector; :dir() with any keyword; :lang() needs well-formed tags. Now that the selector parser accepts a pseudo-element, @scope's prelude rules one out itself: a scoping root or limit is an element.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Nothing ran WPT's selector tests against Parsec (#19), so there was no outside check on what the selector engine matches.
Change
scripts/wpt-selectors-cases.jsextracts the static cases from WPT'sdom/nodesselector suite andcss/selectorsin a Node vm sandbox, at a pinned WPT commit.tests/wpt-selectors.rsruns them.querySelectorhas them;:headingand:heading();[or(;:dir()takes any keyword;:lang()requires well-formed tags;parsec-css:@scope's prelude now rules out a pseudo-element itself, since the selector parser accepts one. A scoping root or limit is an element. A unit test covers it, and the cascade count stays at 1,141.Closes #19
Tests
wpt-dom-selectors: 1,719 passed, 0 failed, 8 skipped.wpt-css-selectors: 461 passed, 0 failed, 668 skipped, each with its reason (layout, rendering, shadow trees, tentative syntax).cargo test --workspace: 254 test groups, 0 failed.