| Index: chrome/browser/favicon/content_favicon_driver_browsertest.cc
|
| diff --git a/chrome/browser/favicon/content_favicon_driver_browsertest.cc b/chrome/browser/favicon/content_favicon_driver_browsertest.cc
|
| index 539aacec46565c1bd45023fa00a1e5291a8aebe6..fc8501097a76e178d2db9dfa396eeb9c7840a742 100644
|
| --- a/chrome/browser/favicon/content_favicon_driver_browsertest.cc
|
| +++ b/chrome/browser/favicon/content_favicon_driver_browsertest.cc
|
| @@ -443,6 +443,29 @@ IN_PROC_BROWSER_TEST_F(
|
| GetFaviconForPageURL(landing_url, favicon_base::FAVICON).bitmap_data);
|
| }
|
|
|
| +// Test that a page which uses JavaScript's history.replaceState() to update
|
| +// the URL in the omnibox (and history) gets associated favicons.
|
| +IN_PROC_BROWSER_TEST_F(ContentFaviconDriverTest,
|
| + AssociateIconWithInitialPageIconDespiteReplaceState) {
|
| + ASSERT_TRUE(embedded_test_server()->Start());
|
| + GURL url =
|
| + embedded_test_server()->GetURL("/favicon/replacestate_with_favicon.html");
|
| + GURL replacestate_url = embedded_test_server()->GetURL(
|
| + "/favicon/replacestate_with_favicon_replaced.html");
|
| +
|
| + PendingTaskWaiter waiter(web_contents(), replacestate_url);
|
| + ui_test_utils::NavigateToURLWithDisposition(
|
| + browser(), url, WindowOpenDisposition::CURRENT_TAB,
|
| + ui_test_utils::BROWSER_TEST_NONE);
|
| + waiter.Wait();
|
| +
|
| + EXPECT_NE(nullptr,
|
| + GetFaviconForPageURL(url, favicon_base::FAVICON).bitmap_data);
|
| + EXPECT_NE(nullptr,
|
| + GetFaviconForPageURL(replacestate_url, favicon_base::FAVICON)
|
| + .bitmap_data);
|
| +}
|
| +
|
| #if defined(OS_ANDROID)
|
| IN_PROC_BROWSER_TEST_F(ContentFaviconDriverTest,
|
| LoadIconFromWebManifestDespitePushState) {
|
|
|