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

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

Issue 2566523003: Fix meta-theme-color not working outside <head> (Closed)
Patch Set: update Created 4 years 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/Document.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/DocumentTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentTest.cpp b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
index 5aa5712de737645acf67a4b34b684311e9ad3aff..09505a883dbc37812db3d9a567dc7ec10de763dd 100644
--- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
@@ -590,4 +590,23 @@ TEST_F(DocumentTest, SynchronousMutationNotifierUpdateCharacterData) {
EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_newLength, 3u);
}
+// This tests that meta-theme-color can be found correctly
+TEST_F(DocumentTest, ThemeColor) {
+ {
+ setHtmlInnerHTML(
+ "<meta name=\"theme-color\" content=\"#00ff00\">"
+ "<body>");
+ EXPECT_EQ(Color(0, 255, 0), document().themeColor())
+ << "Theme color should be bright green.";
+ }
+
+ {
+ setHtmlInnerHTML(
+ "<body>"
+ "<meta name=\"theme-color\" content=\"#00ff00\">");
+ EXPECT_EQ(Color(0, 255, 0), document().themeColor())
+ << "Theme color should be bright green.";
+ }
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698