Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp

Issue 1544893003: Don't add rule features across ::content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused method Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698