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

Unified Diff: Source/core/css/invalidation/DescendantInvalidationSetTest.cpp

Issue 946993002: Avoid style invalidation for empty sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added dummy selectors to tests to force descendant invalidation Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/invalidation/DescendantInvalidationSetTest.cpp
diff --git a/Source/core/css/invalidation/DescendantInvalidationSetTest.cpp b/Source/core/css/invalidation/DescendantInvalidationSetTest.cpp
index e201215175de8c0d520426c11f441128ea74a3c4..c49328887b1276e18c7d85b99da747dd870f8a9e 100644
--- a/Source/core/css/invalidation/DescendantInvalidationSetTest.cpp
+++ b/Source/core/css/invalidation/DescendantInvalidationSetTest.cpp
@@ -61,6 +61,16 @@ TEST(DescendantInvalidationSetTest, SubtreeInvalid_Combine_2)
ASSERT_TRUE(set1->isEmpty());
}
+TEST(DescendantInvalidationSetTest, SubtreeInvalid_AddCustomPseudoBefore)
+{
+ RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSet::create();
+ set->setCustomPseudoInvalid();
+ ASSERT_FALSE(set->isEmpty());
+
+ set->setWholeSubtreeInvalid();
+ ASSERT_TRUE(set->isEmpty());
+}
+
#ifndef NDEBUG
TEST(DescendantInvalidationSetTest, ShowDebug)
{
« no previous file with comments | « Source/core/css/invalidation/DescendantInvalidationSet.cpp ('k') | Source/core/css/invalidation/StyleInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698