| 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
|
|
|