Commit 7323cad3 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Backport some tests in /components/omnibox to SingleThreadTaskEnvironment

These tests were previously migrated from single-threaded MessageLoop to
a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
part of crbug.com/891670.

//base OWNERS decided in retrospect that it was better to keep a
single-threaded option for TaskEnvironment and introduced
SingleThreadTaskEnvironment. This CL retrofits that decision for
/components/omnibox.

This CL is a no-op if it passes CQ.

This CL was uploaded by git cl split.

Edit: Revert changes to HQPPerfTestOnePopularURL which needs
      base::ThreadPool now.

R=jdonnelly@chromium.org

Bug: 891670
Change-Id: I625d146aca749921b09a9af2ec8ed68d355bcf10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786756
Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694750}
parent b6c231b5
...@@ -33,7 +33,7 @@ class OmniboxControllerTest : public testing::Test { ...@@ -33,7 +33,7 @@ class OmniboxControllerTest : public testing::Test {
void SetUp() override; void SetUp() override;
void TearDown() override; void TearDown() override;
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
std::unique_ptr<TestOmniboxClient> omnibox_client_; std::unique_ptr<TestOmniboxClient> omnibox_client_;
std::unique_ptr<OmniboxController> omnibox_controller_; std::unique_ptr<OmniboxController> omnibox_controller_;
......
...@@ -152,7 +152,7 @@ class ZeroSuggestProviderTest : public testing::Test, ...@@ -152,7 +152,7 @@ class ZeroSuggestProviderTest : public testing::Test,
void CreateMostVisitedFieldTrial(); void CreateMostVisitedFieldTrial();
void SetZeroSuggestVariantForAllContexts(const std::string& variant); void SetZeroSuggestVariantForAllContexts(const std::string& variant);
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_; std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_;
std::unique_ptr<FakeAutocompleteProviderClient> client_; std::unique_ptr<FakeAutocompleteProviderClient> client_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment