Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: chrome/browser/sessions/session_restore_stats_collector_unittest.cc

Issue 2677153002: Use TaskScheduler instead of blocking pool in render_widget_host_impl.cc. (Closed)
Patch Set: ScopedTaskSchedulers Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore_stats_collector_unittest.cc
diff --git a/chrome/browser/sessions/session_restore_stats_collector_unittest.cc b/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
index 7e6e90e63c043e31a656394c83d0b799d5233736..ea2a8e0c87aab3e3298d44998736226e58765846 100644
--- a/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
+++ b/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
@@ -8,7 +8,6 @@
#include <utility>
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/test/simple_test_tick_clock.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_service.h"
@@ -16,7 +15,7 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_web_contents_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -181,8 +180,7 @@ class SessionRestoreStatsCollectorTest : public testing::Test {
public:
using RestoredTab = SessionRestoreDelegate::RestoredTab;
- SessionRestoreStatsCollectorTest()
- : ui_thread_(content::BrowserThread::UI, &message_loop_) {}
+ SessionRestoreStatsCollectorTest() = default;
void SetUp() override {
test_web_contents_factory_.reset(new content::TestWebContentsFactory);
@@ -289,17 +287,15 @@ class SessionRestoreStatsCollectorTest : public testing::Test {
stats_collector_->DeferTab(controller);
}
+ content::TestBrowserThreadBundle test_browser_thread_bundle_;
+ // |test_browser_thread_bundle_| needs to still be alive when
+ // |testing_profile_| is destroyed.
+ TestingProfile testing_profile_;
+
// Inputs to the stats collector. Reset prior to each test.
base::SimpleTestTickClock* test_tick_clock_;
std::vector<RestoredTab> restored_tabs_;
- // Infrastructure needed for using the TestWebContentsFactory. These are
- // initialized once by the fixture and reused across unittests.
- base::MessageLoop message_loop_;
- content::TestBrowserThread ui_thread_;
- // |ui_thread_| needs to still be alive when |testing_profile_| is destroyed.
- TestingProfile testing_profile_;
-
// A new web contents factory is generated per test. This automatically cleans
// up any tabs created by previous tests.
std::unique_ptr<content::TestWebContentsFactory> test_web_contents_factory_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698