#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <memory>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/history/core/browser/history_database_params.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/test/test_history_database.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace history {
namespace {
struct TestEntry { … } test_entries[] = …;
bool NthResultIs(const QueryResults& results,
int n,
int test_entry_index) { … }
}
class HistoryQueryTest : public testing::Test { … };
TEST_F(HistoryQueryTest, Basic) { … }
TEST_F(HistoryQueryTest, BasicCount) { … }
TEST_F(HistoryQueryTest, ReachedBeginning) { … }
TEST_F(HistoryQueryTest, TextSearch) { … }
TEST_F(HistoryQueryTest, TextSearchPrefix) { … }
TEST_F(HistoryQueryTest, HostSearch) { … }
TEST_F(HistoryQueryTest, TextSearchCount) { … }
TEST_F(HistoryQueryTest, TextSearchIDN) { … }
TEST_F(HistoryQueryTest, Paging) { … }
TEST_F(HistoryQueryTest, TextSearchPaging) { … }
}