| Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc
|
| diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
|
| index 85afbdb2bea4c574c8b00ece48cf6f5c22954d1a..0412e2545faec36a0b20bb72f417f45bae5aeb33 100644
|
| --- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
|
| +++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
|
| @@ -6016,4 +6016,26 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
|
| "Referer: http://a.com:.*/form_that_posts_cross_site.html"));
|
| }
|
|
|
| +// Check that the favicon is not cleared for navigating in-page.
|
| +IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
|
| + InPageNavigationDoesNotClearFavicon) {
|
| + // Load a page and fake a favicon for it.
|
| + NavigationController& controller = shell()->web_contents()->GetController();
|
| + ASSERT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page1")));
|
| + content::NavigationEntry* entry = controller.GetLastCommittedEntry();
|
| + ASSERT_TRUE(entry);
|
| + content::FaviconStatus& favicon_status = entry->GetFavicon();
|
| + favicon_status.valid = true;
|
| +
|
| + ASSERT_TRUE(RendererLocationReplace(shell(), GURL("data:text/html,page1#")));
|
| + entry = controller.GetLastCommittedEntry();
|
| + content::FaviconStatus& favicon_status2 = entry->GetFavicon();
|
| + EXPECT_TRUE(favicon_status2.valid);
|
| +
|
| + ASSERT_TRUE(RendererLocationReplace(shell(), GURL("data:text/html,page2")));
|
| + entry = controller.GetLastCommittedEntry();
|
| + content::FaviconStatus& favicon_status3 = entry->GetFavicon();
|
| + EXPECT_FALSE(favicon_status3.valid);
|
| +}
|
| +
|
| } // namespace content
|
|
|