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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngineTest.cpp

Issue 2700943003: Invalidate custom pseudo elements for RuleSet invalidations. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
index 7859ffbcbf2c8ee884d29ac5d0bac47a02d38134..60f4c1671c138878a8ebe05345e1aa8342fe60a5 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
@@ -184,6 +184,23 @@ TEST_F(StyleEngineTest, RuleSetInvalidationTypeSelectors) {
EXPECT_EQ(1u, afterCount - beforeCount);
}
+TEST_F(StyleEngineTest, RuleSetInvalidationCustomPseudo) {
+ document().body()->setInnerHTML(
+ "<style>progress { -webkit-appearance:none }</style>"
+ "<progress></progress>"
+ "<div></div><div></div><div></div><div></div><div></div><div></div>");
+
+ document().view()->updateAllLifecyclePhases();
+
+ unsigned beforeCount = styleEngine().styleForElementCount();
+ EXPECT_EQ(scheduleInvalidationsForRules(
+ document(), "::-webkit-progress-bar { background: green }"),
+ RuleSetInvalidationsScheduled);
+ document().view()->updateAllLifecyclePhases();
+ unsigned afterCount = styleEngine().styleForElementCount();
+ EXPECT_EQ(3u, afterCount - beforeCount);
+}
+
TEST_F(StyleEngineTest, RuleSetInvalidationHost) {
document().body()->setInnerHTML("<div id=nohost></div><div id=host></div>");
Element* host = document().getElementById("host");
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698