OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/RuleFeature.h" | 5 #include "core/css/RuleFeature.h" |
6 | 6 |
7 #include "core/css/CSSSelectorList.h" | 7 #include "core/css/CSSSelectorList.h" |
8 #include "core/css/RuleSet.h" | 8 #include "core/css/RuleSet.h" |
9 #include "core/css/StylePropertySet.h" | 9 #include "core/css/StylePropertySet.h" |
10 #include "core/css/StyleRule.h" | 10 #include "core/css/StyleRule.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 TEST_F(RuleFeatureSetTest, tagName) | 315 TEST_F(RuleFeatureSetTest, tagName) |
316 { | 316 { |
317 updateInvalidationSets(":valid e"); | 317 updateInvalidationSets(":valid e"); |
318 | 318 |
319 InvalidationLists invalidationLists; | 319 InvalidationLists invalidationLists; |
320 collectInvalidationSetsForPseudoClass(invalidationLists, CSSSelector::Pseudo
Valid); | 320 collectInvalidationSetsForPseudoClass(invalidationLists, CSSSelector::Pseudo
Valid); |
321 expectTagNameInvalidation("e", invalidationLists.descendants); | 321 expectTagNameInvalidation("e", invalidationLists.descendants); |
322 } | 322 } |
323 | 323 |
| 324 TEST_F(RuleFeatureSetTest, contentPseudo) |
| 325 { |
| 326 updateInvalidationSets(".a ::content .b"); |
| 327 updateInvalidationSets(".a .c"); |
| 328 |
| 329 InvalidationLists invalidationLists; |
| 330 collectInvalidationSetsForClass(invalidationLists, "a"); |
| 331 expectClassInvalidation("c", invalidationLists.descendants); |
| 332 |
| 333 updateInvalidationSets(".a .b"); |
| 334 |
| 335 invalidationLists.descendants.clear(); |
| 336 collectInvalidationSetsForClass(invalidationLists, "a"); |
| 337 expectClassesInvalidation("b", "c", invalidationLists.descendants); |
| 338 } |
| 339 |
324 } // namespace blink | 340 } // namespace blink |
OLD | NEW |