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

Unified Diff: content/renderer/render_view_browsertest.cc

Issue 64853004: Use high resolution icons where possible for streamlined hosted app icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_experiment_create_app_from_page
Patch Set: fix tests for linux Created 7 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 | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_browsertest.cc
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 92d8fccb88e1ea6dc6ce81bf81d33b1e4dbc2788..d2a95239893061a491d232facb8e15c18c2cb6d9 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -2150,4 +2150,26 @@ TEST_F(RenderViewImplTest, SendCandidateWindowEvents) {
EXPECT_EQ(output, "\nResult:showupdatehide");
}
+// Ensure the render view sends favicon url update events correctly.
+TEST_F(RenderViewImplTest, SendFaviconURLUpdateEvent) {
+ // An event should be sent when a favicon url exists.
+ LoadHTML("<html>"
+ "<head>"
+ "<link rel='icon' href='http://www.google.com/favicon.ico'>"
+ "</head>"
+ "</html>");
+ EXPECT_TRUE(render_thread_->sink().GetFirstMessageMatching(
+ ViewHostMsg_UpdateFaviconURL::ID));
+ render_thread_->sink().ClearMessages();
+
+ // An event should not be sent if no favicon url exists. This is an assumption
+ // made by some of Chrome's favicon handling.
+ LoadHTML("<html>"
+ "<head>"
+ "</head>"
+ "</html>");
+ EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
+ ViewHostMsg_UpdateFaviconURL::ID));
+}
+
} // namespace content
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698