Commit 1f8f83fe authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

[scheduling] Use ScopedTaskEnvironment instead of MessageLoop in omnibox

MessageLoop will go away, eventually.

BUG=891670

Change-Id: Ib283fca5ff7e09a4e24bde1f728e195ad365e6ce
Reviewed-on: https://chromium-review.googlesource.com/c/1352761Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#611753}
parent 23592b26
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "base/macros.h" #include "base/macros.h"
#include "base/message_loop/message_loop.h" #include "base/test/scoped_task_environment.h"
#include "components/omnibox/browser/autocomplete_controller.h" #include "components/omnibox/browser/autocomplete_controller.h"
#include "components/omnibox/browser/autocomplete_provider.h" #include "components/omnibox/browser/autocomplete_provider.h"
#include "components/omnibox/browser/omnibox_client.h" #include "components/omnibox/browser/omnibox_client.h"
...@@ -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::MessageLoop message_loop_; base::test::ScopedTaskEnvironment 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_;
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#include "components/omnibox/browser/omnibox_pedal.h" #include "components/omnibox/browser/omnibox_pedal.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_task_environment.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "components/omnibox/browser/mock_autocomplete_provider_client.h" #include "components/omnibox/browser/mock_autocomplete_provider_client.h"
#include "components/omnibox/browser/omnibox_pedal_provider.h" #include "components/omnibox/browser/omnibox_pedal_provider.h"
...@@ -20,7 +20,7 @@ class OmniboxPedalTest : public testing::Test { ...@@ -20,7 +20,7 @@ class OmniboxPedalTest : public testing::Test {
: omnibox_client_(new TestOmniboxClient), : omnibox_client_(new TestOmniboxClient),
omnibox_edit_controller_(new TestOmniboxEditController) {} omnibox_edit_controller_(new TestOmniboxEditController) {}
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment task_environment_;
std::unique_ptr<TestOmniboxClient> omnibox_client_; std::unique_ptr<TestOmniboxClient> omnibox_client_;
std::unique_ptr<TestOmniboxEditController> omnibox_edit_controller_; std::unique_ptr<TestOmniboxEditController> omnibox_edit_controller_;
}; };
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
#include "components/omnibox/browser/query_in_omnibox.h" #include "components/omnibox/browser/query_in_omnibox.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
#include "base/test/scoped_task_environment.h"
#include "components/omnibox/browser/omnibox_field_trial.h" #include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/browser/test_omnibox_client.h" #include "components/omnibox/browser/test_omnibox_client.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -28,7 +28,7 @@ class QueryInOmniboxTest : public testing::Test { ...@@ -28,7 +28,7 @@ class QueryInOmniboxTest : public testing::Test {
QueryInOmnibox* model() { return model_.get(); } QueryInOmnibox* model() { return model_.get(); }
private: private:
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment task_environment_;
std::unique_ptr<TestOmniboxClient> omnibox_client_; std::unique_ptr<TestOmniboxClient> omnibox_client_;
std::unique_ptr<QueryInOmnibox> model_; std::unique_ptr<QueryInOmnibox> model_;
}; };
......
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