Commit 798f74f2 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

[scheduling] Use ScopedTaskEnvironment instead of MessageLoop in bookmarks

MessageLoop will go away, eventually.

BUG=891670

Change-Id: I5d914cd64396fbc0cd3d6610981f50f8ffc0b31e
Reviewed-on: https://chromium-review.googlesource.com/c/1352263Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#613135}
parent 621cacb5
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_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/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/common/bookmark_pref_names.h" #include "components/bookmarks/common/bookmark_pref_names.h"
...@@ -32,7 +32,7 @@ class BookmarkExpandedStateTrackerTest : public testing::Test { ...@@ -32,7 +32,7 @@ class BookmarkExpandedStateTrackerTest : public testing::Test {
void SetUp() override; void SetUp() override;
void TearDown() override; void TearDown() override;
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment task_environment_;
TestingPrefServiceSimple prefs_; TestingPrefServiceSimple prefs_;
std::unique_ptr<BookmarkModel> model_; std::unique_ptr<BookmarkModel> model_;
......
...@@ -35,6 +35,7 @@ source_set("unit_tests") { ...@@ -35,6 +35,7 @@ source_set("unit_tests") {
deps = [ deps = [
":managed", ":managed",
"//base", "//base",
"//base/test:test_support",
"//components/bookmarks/browser", "//components/bookmarks/browser",
"//components/bookmarks/common", "//components/bookmarks/common",
"//components/bookmarks/test", "//components/bookmarks/test",
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h" #include "base/files/scoped_temp_dir.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_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/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_model_observer.h" #include "components/bookmarks/browser/bookmark_model_observer.h"
...@@ -171,7 +171,7 @@ class ManagedBookmarksTrackerTest : public testing::Test { ...@@ -171,7 +171,7 @@ class ManagedBookmarksTrackerTest : public testing::Test {
} }
base::ScopedTempDir scoped_temp_dir_; base::ScopedTempDir scoped_temp_dir_;
base::MessageLoop loop_; base::test::ScopedTaskEnvironment task_environment_;
TestingPrefServiceSimple prefs_; TestingPrefServiceSimple prefs_;
std::unique_ptr<BookmarkModel> model_; std::unique_ptr<BookmarkModel> model_;
MockBookmarkModelObserver observer_; MockBookmarkModelObserver observer_;
......
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