#include "components/history/core/browser/top_sites_impl.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "components/history/core/browser/features.h"
#include "components/history/core/browser/history_client.h"
#include "components/history/core/browser/history_constants.h"
#include "components/history/core/browser/history_database_params.h"
#include "components/history/core/browser/history_db_task.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/top_sites.h"
#include "components/history/core/browser/top_sites_observer.h"
#include "components/history/core/browser/visit_delegate.h"
#include "components/history/core/test/history_service_test_util.h"
#include "components/history/core/test/history_unittest_base.h"
#include "components/history/core/test/test_history_database.h"
#include "components/history/core/test/wait_top_sites_loaded_observer.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/search_engines/search_engines_test_environment.h"
#include "components/search_engines/template_url.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
ContainerEq;
namespace history {
namespace {
const char kApplicationScheme[] = …;
const char kPrepopulatedPageURL[] = …;
bool MockCanAddURLToHistory(const GURL& url) { … }
class TopSitesQuerier { … };
}
class TopSitesImplTest : public HistoryUnitTestBase { … };
class MockTopSitesObserver : public TopSitesObserver { … };
TEST_F(TopSitesImplTest, DoTitlesDiffer) { … }
TEST_F(TopSitesImplTest, DiffMostVisited) { … }
TEST_F(TopSitesImplTest, GetMostVisited) { … }
TEST_F(TopSitesImplTest, GetMostVisitedURLsAndQueries) { … }
TEST_F(TopSitesImplTest, GetMostVisitedWithRedirect) { … }
TEST_F(TopSitesImplTest, SaveToDB) { … }
TEST_F(TopSitesImplTest, RealDatabase) { … }
TEST_F(TopSitesImplTest, DeleteNotifications) { … }
TEST_F(TopSitesImplTest, NotifyCallbacksWhenLoaded) { … }
TEST_F(TopSitesImplTest, CancelingRequestsForTopSites) { … }
TEST_F(TopSitesImplTest, BlockedUrlsWithoutPrepopulated) { … }
TEST_F(TopSitesImplTest, BlockingPrepopulated) { … }
TEST_F(TopSitesImplTest, AddPrepopulatedPages) { … }
}