Closed Bug 1484491 Opened 2 years ago Closed 1 year ago

[wpt-sync] Sync PR 12561 - Add two selector tests for :nth-child selector with whitespace in the argument

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 12561 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/12561
Details from upstream follow.

Jason Killian <jason.killian@trialspark.com> wrote:
>  Add two selector tests for :nth-child selector with whitespace in the argument
>  
>  Over in [nwsapi](https://github.com/dperini/nwsapi) (which powers [jsdom](https://github.com/jsdom/jsdom)), we found [an issue](https://github.com/dperini/nwsapi/issues/20) where having space in an `nth-child` selector (e.g. `:nth-child(2n - 1)`) was causing the selector to fail.
>  
>  This PR adds two lines of tests to ensure that this scenario is covered. I verified that selectors with spaces like these two work in FF and Chrome and also that [the spec](https://drafts.csswg.org/selectors-3/#nth-child-pseudo) allows whitespace here.
Component: web-platform-tests → DOM
Product: Testing → Core
Ran 4 tests and 5208 subtests
OK     : 4
PASS   : 5208
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/32fec4d9b64b
[wpt PR 12561] - Add two selector tests for :nth-child selector with whitespace in the argument, a=testonly
https://hg.mozilla.org/mozilla-central/rev/32fec4d9b64b
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.