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

Unified Diff: third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp

Issue 2650743002: Return ActiveSheetsChanged when rulesets change in common prefix. (Closed)
Patch Set: Documentation and more descriptive variable name. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/ActiveStyleSheets.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/css/ActiveStyleSheetsTest.cpp
diff --git a/third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp b/third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp
index 1cd52d06d0b5a4b10a4d9b6a833a7c7a20bfb4af..1007d24c51d26270f4ef417d1313d44a02639648 100644
--- a/third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp
+++ b/third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp
@@ -328,6 +328,23 @@ TEST_F(ActiveStyleSheetsTest, CompareActiveStyleSheets_ReorderedImportSheets) {
EXPECT_EQ(0u, changedRuleSets.size());
}
+TEST_F(ActiveStyleSheetsTest, CompareActiveStyleSheets_DisableAndAppend) {
+ ActiveStyleSheetVector oldSheets;
+ ActiveStyleSheetVector newSheets;
+ HeapHashSet<Member<RuleSet>> changedRuleSets;
+
+ CSSStyleSheet* sheet1 = createSheet();
+ CSSStyleSheet* sheet2 = createSheet();
+
+ oldSheets.push_back(std::make_pair(sheet1, &sheet1->contents()->ruleSet()));
+ newSheets.push_back(std::make_pair(sheet1, nullptr));
+ newSheets.push_back(std::make_pair(sheet2, &sheet2->contents()->ruleSet()));
+
+ EXPECT_EQ(ActiveSheetsChanged,
+ compareActiveStyleSheets(oldSheets, newSheets, changedRuleSets));
+ EXPECT_EQ(2u, changedRuleSets.size());
+}
+
TEST_F(ApplyRulesetsTest, AddUniversalRuleToDocument) {
document().view()->updateAllLifecyclePhases();
« no previous file with comments | « third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698