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

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

Issue 2879223002: Don't try to set the empty string as the preferred set. (Closed)
Patch Set: Created 3 years, 7 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/dom/StyleEngine.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 da6ca9d5d107a85ed355a43256baf4db658dd210..d6979b2c8da494b263afc2928dbcbfbce2a69cec 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
@@ -557,4 +557,21 @@ TEST_F(StyleEngineTest, NoScheduledRuleSetInvalidationsOnNewShadow) {
EXPECT_FALSE(GetDocument().NeedsStyleInvalidation());
}
+TEST_F(StyleEngineTest, EmptyHttpEquivDefaultStyle) {
+ GetDocument().body()->setInnerHTML(
+ "<style>div { color:pink }</style><div id=container></div>");
+ GetDocument().View()->UpdateAllLifecyclePhases();
+
+ EXPECT_FALSE(GetStyleEngine().NeedsActiveStyleUpdate());
+
+ Element* container = GetDocument().getElementById("container");
+ ASSERT_TRUE(container);
+ container->setInnerHTML("<meta http-equiv='default-style' content=''>");
+ EXPECT_FALSE(GetStyleEngine().NeedsActiveStyleUpdate());
+
+ container->setInnerHTML(
+ "<meta http-equiv='default-style' content='preferred'>");
+ EXPECT_TRUE(GetStyleEngine().NeedsActiveStyleUpdate());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698