#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <algorithm>
#include <memory>
#include <random>
#include <string>
#include <string_view>
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/bookmarks/test/test_bookmark_client.h"
#include "components/history/core/browser/history_backend.h"
#include "components/history/core/browser/history_database.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/test/history_service_test_util.h"
#include "components/omnibox/browser/fake_autocomplete_provider_client.h"
#include "components/omnibox/browser/history_quick_provider.h"
#include "components/omnibox/browser/history_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
namespace history {
namespace {
std::string GenerateFakeHashedString(size_t sym_count) { … }
URLRow GeneratePopularURLRow() { … }
StringPieces;
StringPieces AllPrefixes(const std::string& str) { … }
}
class HQPPerfTestOnePopularURL : public testing::Test { … };
void HQPPerfTestOnePopularURL::SetUp() { … }
void HQPPerfTestOnePopularURL::TearDown() { … }
void HQPPerfTestOnePopularURL::PrepareData() { … }
void HQPPerfTestOnePopularURL::PrintMeasurements(
const std::string& story_name,
const std::vector<base::TimeDelta>& measurements) { … }
base::TimeDelta HQPPerfTestOnePopularURL::RunTest(const std::u16string& text) { … }
template <typename PieceIt>
void HQPPerfTestOnePopularURL::RunAllTests(PieceIt first, PieceIt last) { … }
TEST_F(HQPPerfTestOnePopularURL, Typing) { … }
TEST_F(HQPPerfTestOnePopularURL, Backspacing) { … }
}