Bug 1685621 - Add more :not() serialization tests. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D101097
This commit is contained in:
Tim Nguyen 2021-01-08 08:07:26 +00:00
parent 76a6febc54
commit baecc7fa42
2 changed files with 6 additions and 0 deletions

View File

@ -1243,6 +1243,10 @@ function runTests() {
test_balanced_unparseable(":not(:nth-child(2k))");
test_balanced_unparseable(":not(:nth-child(()))");
// Bug 1685621 - Serialization of :not()
should_serialize_to(":not([disabled][selected])", ":not([disabled][selected])");
should_serialize_to(":not([disabled],[selected])", ":not([disabled], [selected])");
// :-moz-any()
let parseable_if_any_is_is_and_has_better_error_recovery =
SpecialPowers.getBoolPref("layout.css.is-and-where-better-error-recovery.enabled")

View File

@ -24,6 +24,8 @@
test_valid_selector(':not(:host(.a))');
test_valid_selector(':host(:not(.a))');
test_valid_selector(':not(:host(:not(.a)))');
test_valid_selector(':not([disabled][selected])', ':not([disabled][selected])');
test_valid_selector(':not([disabled],[selected])', ':not([disabled], [selected])');
test_invalid_selector(':not()');
test_invalid_selector(':not(:not())');