#include "components/history/core/browser/browsing_history_service.h"
#include <utility>
#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/timer/mock_timer.h"
#include "base/values.h"
#include "components/history/core/browser/browsing_history_driver.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/test/fake_web_history_service.h"
#include "components/history/core/test/history_service_test_util.h"
#include "components/sync/service/sync_service_observer.h"
#include "components/sync/test/mock_sync_service.h"
#include "net/http/http_status_code.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
Time;
namespace history {
HistoryEntry;
namespace {
const char kUrl1[] = …;
const char kUrl2[] = …;
const char kUrl3[] = …;
const char kUrl4[] = …;
const char kUrl5[] = …;
const char kUrl6[] = …;
const char kUrl7[] = …;
const char kUrl8[] = …;
const char kUrl9[] = …;
const char kUrl10[] = …;
const char kIconUrl1[] = …;
const HistoryEntry::EntryType kLocal = …;
const HistoryEntry::EntryType kRemote = …;
const HistoryEntry::EntryType kBoth = …;
struct TestResult { … };
class TestBrowsingHistoryDriver : public BrowsingHistoryDriver { … };
class TestWebHistoryService : public FakeWebHistoryService { … };
class ReversedWebHistoryService : public TestWebHistoryService { … };
class TimeoutWebHistoryService : public TestWebHistoryService { … };
class TestBrowsingHistoryService : public BrowsingHistoryService { … };
class BrowsingHistoryServiceTest : public ::testing::Test { … };
TEST_F(BrowsingHistoryServiceTest, QueryHistoryNoSources) { … }
TEST_F(BrowsingHistoryServiceTest, EmptyQueryHistoryJustLocal) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryJustLocal) { … }
TEST_F(BrowsingHistoryServiceTest, EmptyQueryHistoryJustWeb) { … }
TEST_F(BrowsingHistoryServiceTest, EmptyQueryHistoryDelayedWeb) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryJustWeb) { … }
TEST_F(BrowsingHistoryServiceTest, EmptyQueryHistoryBothSources) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryAllSources) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryLocalTimeRanges) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryRemoteTimeRanges) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryHostOnlyRemote) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryLocalPagingPartial) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryLocalPagingFull) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryRemotePagingPartial) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryRemotePagingFull) { … }
TEST_F(BrowsingHistoryServiceTest, MergeDuplicatesSameDay) { … }
TEST_F(BrowsingHistoryServiceTest, MergeDuplicatesNextDayNotRemoved) { … }
TEST_F(BrowsingHistoryServiceTest, MergeDuplicatesMultipleDays) { … }
TEST_F(BrowsingHistoryServiceTest, MergeDuplicatesVerifyTimestamps) { … }
TEST_F(BrowsingHistoryServiceTest, MergeDuplicatesKeepNonEmptyIconUrl) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryMerge) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryPending) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryFullLocalPending) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryPartialLocalPending) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryFullRemotePending) { … }
TEST_F(BrowsingHistoryServiceTest, QueryHistoryPartialRemotePending) { … }
TEST_F(BrowsingHistoryServiceTest, RetryOnRemoteFailureEmpty) { … }
TEST_F(BrowsingHistoryServiceTest, RetryOnRemoteFailurePagingRemote) { … }
TEST_F(BrowsingHistoryServiceTest, RetryOnRemoteFailurePagingLocal) { … }
TEST_F(BrowsingHistoryServiceTest, WebHistoryTimeout) { … }
TEST_F(BrowsingHistoryServiceTest, ObservingWebHistory) { … }
TEST_F(BrowsingHistoryServiceTest, ObservingWebHistoryDelayedWeb) { … }
TEST_F(BrowsingHistoryServiceTest, IncorrectlyOrderedRemoteResults) { … }
}
}