#include "chrome/browser/predictors/autocomplete_action_predictor.h"
#include <stddef.h>
#include <string>
#include <vector>
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/memory/ref_counted.h"
#include "base/no_destructor.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/timer/elapsed_timer.h"
#include "base/uuid.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/preloading/chrome_preloading.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/testing_profile.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/browser/in_memory_database.h"
#include "components/history/core/browser/url_database.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_field_trial.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_manager.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_result.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/preloading_test_util.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "content/public/test/web_contents_tester.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
ASCIIToUTF16;
WebContents;
AutocompleteActionPredictor;
UkmEntry;
Preloading_Prediction;
namespace {
struct TestUrlInfo { … };
AutocompleteActionPredictor::Action ExpectedActionBasedOnConfidenceOnly(
int number_of_hits,
int number_of_misses) { … }
const std::vector<TestUrlInfo>& TestUrlDb() { … }
const std::vector<TestUrlInfo>& TestUrlConfidenceDb() { … }
}
namespace predictors {
class AutocompleteActionPredictorTest : public testing::Test { … };
TEST_F(AutocompleteActionPredictorTest, AddRow) { … }
TEST_F(AutocompleteActionPredictorTest, UpdateRow) { … }
TEST_F(AutocompleteActionPredictorTest, DeleteAllRows) { … }
TEST_F(AutocompleteActionPredictorTest, DeleteRowsFromCaches) { … }
TEST_F(AutocompleteActionPredictorTest, DeleteOldIdsFromCaches) { … }
TEST_F(AutocompleteActionPredictorTest,
DeleteLowestConfidenceRowsFromCaches_OneByOne) { … }
TEST_F(AutocompleteActionPredictorTest,
DeleteLowestConfidenceRowsFromCaches_Bulk) { … }
TEST_F(AutocompleteActionPredictorTest, OnURLsDeletedExpired) { … }
TEST_F(AutocompleteActionPredictorTest, OnURLsDeletedNonExpired) { … }
TEST_F(AutocompleteActionPredictorTest, RecommendActionURL) { … }
TEST_F(AutocompleteActionPredictorTest, RecommendActionSearch) { … }
TEST_F(AutocompleteActionPredictorTest,
RegisterTransitionalMatchesUserTextSizeLimits) { … }
TEST_F(AutocompleteActionPredictorTest,
RegisterTransitionalMatchesURLSizeLimits) { … }
TEST_F(AutocompleteActionPredictorTest, UpdateDatabaseFromTransitionalMatches) { … }
}