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 5439aee3d760b81b3c1433a06942024dadb8166d..0c5214345048ee6c169cea85a8dd73c3d2a1fdf1 100644 |
--- a/components/favicon/content/content_favicon_driver_unittest.cc |
+++ b/components/favicon/content/content_favicon_driver_unittest.cc |
@@ -78,7 +78,7 @@ TEST_F(ContentFaviconDriverTest, ShouldCauseImageDownload) { |
// Mimic a page load. |
TestFetchFaviconForPage( |
kPageURL, |
- {content::FaviconURL(kIconURL, content::FaviconURL::FAVICON, |
+ {content::FaviconURL(kIconURL, content::FaviconURL::IconType::kFavicon, |
kEmptyIconSizes)}); |
EXPECT_TRUE(web_contents_tester()->TestDidDownloadImage( |
kIconURL, 200, kEmptyIcons, kEmptyIconSizes)); |
@@ -92,7 +92,7 @@ TEST_F(ContentFaviconDriverTest, ShouldNotRequestRepeatedlyIfUnavailable) { |
// Mimic a page load. |
TestFetchFaviconForPage( |
kPageURL, |
- {content::FaviconURL(kIconURL, content::FaviconURL::FAVICON, |
+ {content::FaviconURL(kIconURL, content::FaviconURL::IconType::kFavicon, |
kEmptyIconSizes)}); |
// Verify that no download request is pending for the image. |
EXPECT_FALSE(web_contents_tester()->HasPendingDownloadImage(kIconURL)); |
@@ -105,9 +105,10 @@ TEST_F(ContentFaviconDriverTest, ShouldDownloadSecondIfFirstUnavailable) { |
// Mimic a page load. |
TestFetchFaviconForPage( |
kPageURL, |
- {content::FaviconURL(kIconURL, content::FaviconURL::FAVICON, |
+ {content::FaviconURL(kIconURL, content::FaviconURL::IconType::kFavicon, |
kEmptyIconSizes), |
- content::FaviconURL(kOtherIconURL, content::FaviconURL::FAVICON, |
+ content::FaviconURL(kOtherIconURL, |
+ content::FaviconURL::IconType::kFavicon, |
kEmptyIconSizes)}); |
// Verify a download request is pending for the second image. |
EXPECT_FALSE(web_contents_tester()->HasPendingDownloadImage(kIconURL)); |
@@ -121,9 +122,9 @@ TEST_F(ContentFaviconDriverTest, FaviconUpdateNoLastCommittedEntry) { |
ASSERT_EQ(nullptr, web_contents()->GetController().GetLastCommittedEntry()); |
std::vector<content::FaviconURL> favicon_urls; |
- favicon_urls.push_back( |
- content::FaviconURL(GURL("http://www.google.ca/favicon.ico"), |
- content::FaviconURL::FAVICON, kEmptyIconSizes)); |
+ favicon_urls.push_back(content::FaviconURL( |
+ GURL("http://www.google.ca/favicon.ico"), |
+ content::FaviconURL::IconType::kFavicon, kEmptyIconSizes)); |
favicon::ContentFaviconDriver* driver = |
favicon::ContentFaviconDriver::FromWebContents(web_contents()); |
static_cast<content::WebContentsObserver*>(driver) |
@@ -141,9 +142,9 @@ TEST_F(ContentFaviconDriverTest, RecordsHistorgramsForCandidates) { |
// Navigation to a page updating one icon. |
NavigateAndCommit(GURL("http://www.youtube.com")); |
- driver_as_observer->DidUpdateFaviconURL( |
- {content::FaviconURL(GURL("http://www.youtube.com/favicon.ico"), |
- content::FaviconURL::FAVICON, kSizes16x16and32x32)}); |
+ driver_as_observer->DidUpdateFaviconURL({content::FaviconURL( |
+ GURL("http://www.youtube.com/favicon.ico"), |
+ content::FaviconURL::IconType::kFavicon, kSizes16x16and32x32)}); |
EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesCount"), |
ElementsAre(base::Bucket(/*min=*/1, /*count=*/1))); |
@@ -154,12 +155,14 @@ TEST_F(ContentFaviconDriverTest, RecordsHistorgramsForCandidates) { |
std::vector<content::FaviconURL> favicon_urls = { |
content::FaviconURL(GURL("http://www.google.ca/favicon.ico"), |
- content::FaviconURL::FAVICON, kSizes16x16and32x32), |
+ content::FaviconURL::IconType::kFavicon, |
+ kSizes16x16and32x32), |
content::FaviconURL(GURL("http://www.google.ca/precomposed_icon.png"), |
- content::FaviconURL::TOUCH_PRECOMPOSED_ICON, |
+ content::FaviconURL::IconType::kTouchPrecomposedIcon, |
kEmptyIconSizes), |
content::FaviconURL(GURL("http://www.google.ca/touch_icon.png"), |
- content::FaviconURL::TOUCH_ICON, kEmptyIconSizes)}; |
+ content::FaviconURL::IconType::kTouchIcon, |
+ kEmptyIconSizes)}; |
// Double navigation to a page with 3 different icons. |
NavigateAndCommit(GURL("http://www.google.ca")); |