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

Unified Diff: components/favicon/content/content_favicon_driver_unittest.cc

Issue 1309323004: Create a NavigationEntry for the initial blank page. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GetEntryCount, more tests Created 5 years, 2 months 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
Index: components/favicon/content/content_favicon_driver_unittest.cc
diff --git a/components/favicon/content/content_favicon_driver_unittest.cc b/components/favicon/content/content_favicon_driver_unittest.cc
index 85435be32e3bfafc730dadbf693d25f602422f40..4a4e7523dccc8b50468d8259d27f2b9fca992535 100644
--- a/components/favicon/content/content_favicon_driver_unittest.cc
+++ b/components/favicon/content/content_favicon_driver_unittest.cc
@@ -106,11 +106,11 @@ TEST_F(ContentFaviconDriverTest, UnableToDownloadFavicon) {
favicon_service()->Shutdown();
}
-// Test that ContentFaviconDriver ignores updated favicon URLs if there is no
-// last committed entry. This occurs when script is injected in about:blank.
-// See crbug.com/520759 for more details
-TEST_F(ContentFaviconDriverTest, FaviconUpdateNoLastCommittedEntry) {
- ASSERT_EQ(nullptr, web_contents()->GetController().GetLastCommittedEntry());
+// Test that ContentFaviconDriver handles updated favicon URLs for the initial
+// navigation. This occurs when script is injected in about:blank.
+// See crbug.com/520759 for more details.
+TEST_F(ContentFaviconDriverTest, FaviconUpdateForInitialNavigation) {
+ ASSERT_TRUE(web_contents()->GetController().IsInitialNavigation());
std::vector<content::FaviconURL> favicon_urls;
favicon_urls.push_back(content::FaviconURL(
@@ -122,7 +122,7 @@ TEST_F(ContentFaviconDriverTest, FaviconUpdateNoLastCommittedEntry) {
->DidUpdateFaviconURL(favicon_urls);
// Test that ContentFaviconDriver ignored the favicon url update.
- EXPECT_TRUE(driver->favicon_urls().empty());
+ EXPECT_FALSE(driver->favicon_urls().empty());
}
} // namespace
« no previous file with comments | « components/favicon/content/content_favicon_driver.cc ('k') | components/sessions/content/content_live_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698