diff options
Diffstat (limited to 'chrome/browser/history/top_sites_unittest.cc')
-rw-r--r-- | chrome/browser/history/top_sites_unittest.cc | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc index d6b7ae0..d0ab05f 100644 --- a/chrome/browser/history/top_sites_unittest.cc +++ b/chrome/browser/history/top_sites_unittest.cc @@ -1288,52 +1288,4 @@ TEST_F(TopSitesTest, AddPrepopulatedPages) { EXPECT_EQ(welcome_url(), pages[1].url); } -TEST_F(TopSitesTest, GetIndexForChromeStore) { - MostVisitedURLList pages; - EXPECT_EQ(0, top_sites().GetIndexForChromeStore(pages)); - - MostVisitedURL url = {themes_url()}; - pages.push_back(url); - EXPECT_EQ(1, top_sites().GetIndexForChromeStore(pages)); - - // Store should be added in the first filler. - top_sites().AddPinnedURL(welcome_url(), 3); - top_sites().AddPinnedURL(GURL("http://google.com"), 5); - EXPECT_EQ(1, top_sites().GetIndexForChromeStore(pages)); - - GURL store_url = MostVisitedHandler::GetChromeStoreURLWithLocale(); - url.url = store_url; - pages.push_back(url); - - // Don't add store again. - EXPECT_EQ(-1, top_sites().GetIndexForChromeStore(pages)); - - pages.pop_back(); - EXPECT_EQ(1, top_sites().GetIndexForChromeStore(pages)); - - pages.clear(); - url.url = GURL("http://bbc.com/"); - for (int i = 0; i < 8; i++) { - pages.push_back(url); - } - - EXPECT_EQ(7, top_sites().GetIndexForChromeStore(pages)); - - pages[7].url = GURL("http://gmail.com"); - top_sites().AddPinnedURL(GURL("http://gmail.com"), 7); - - EXPECT_EQ(6, top_sites().GetIndexForChromeStore(pages)); - - // If it's blacklisted, it should not be added. - top_sites().AddBlacklistedURL(store_url); - EXPECT_EQ(-1, top_sites().GetIndexForChromeStore(pages)); - - top_sites().RemoveBlacklistedURL(store_url); - EXPECT_EQ(6, top_sites().GetIndexForChromeStore(pages)); - - top_sites().AddPinnedURL(GURL("http://bbc.com"), 2); - // All pinned - can't add store. - EXPECT_EQ(-1, top_sites().GetIndexForChromeStore(pages)); -} - } // namespace history |