Add selectors with an id in them to the list of revalidation selectors.

This commit is contained in:
Boris Zbarsky 2017-06-01 19:29:11 -04:00
parent 98f95a32da
commit d031b5badb
4 changed files with 82 additions and 1 deletions

View file

@ -77,11 +77,19 @@ fn test_revalidation_selectors() {
let test = parse_selectors(&[
// Not revalidation selectors.
"div",
"#bar",
"div:not(.foo)",
"div span",
"div > span",
// ID selectors.
"#foo1", // FIXME(bz) This one should not be a revalidation
// selector once we fix
// https://bugzilla.mozilla.org/show_bug.cgi?id=1369611
"#foo2::before",
"#foo3 > span",
"#foo1 > span", // FIXME(bz) This one should not be a
// revalidation selector either.
// Attribute selectors.
"div[foo]",
"div:not([foo])",
@ -122,6 +130,12 @@ fn test_revalidation_selectors() {
.collect::<Vec<_>>();
let reference = parse_selectors(&[
// ID selectors.
"#foo1",
"#foo2::before",
"#foo3 > span",
"#foo1 > span",
// Attribute selectors.
"div[foo]",
"div:not([foo])",