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

Unified Diff: ash/common/system/tray/tray_details_view_unittest.cc

Issue 2694623016: chromeos: Makes AshTestBase/Helper target mash when appropriate (Closed)
Patch Set: feedback 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 | « ash/common/BUILD.gn ('k') | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_details_view_unittest.cc
diff --git a/ash/common/system/tray/tray_details_view_unittest.cc b/ash/common/system/tray/tray_details_view_unittest.cc
index e8543c4874d01b81aee0b76ac7bbb5bdbcee3239..80ce057af4777913468e5f1bdf73746b8bdab229 100644
--- a/ash/common/system/tray/tray_details_view_unittest.cc
+++ b/ash/common/system/tray/tray_details_view_unittest.cc
@@ -126,17 +126,30 @@ class TrayDetailsViewTest : public AshTestBase {
void TransitionFromDetailedToDefaultView(TestDetailsView* detailed) {
detailed->TransitionToDefaultView();
- scoped_task_runner_->FastForwardBy(
- base::TimeDelta::FromMilliseconds(kTrayDetailedViewTransitionDelayMs));
+ (*scoped_task_runner_)
+ ->FastForwardBy(base::TimeDelta::FromMilliseconds(
+ kTrayDetailedViewTransitionDelayMs));
}
void FocusBackButton(TestDetailsView* detailed) {
detailed->back_button_->RequestFocus();
}
+ void SetUp() override {
+ AshTestBase::SetUp();
+ scoped_task_runner_ =
+ base::MakeUnique<base::ScopedMockTimeMessageLoopTaskRunner>();
+ }
+
+ void TearDown() override {
+ scoped_task_runner_.reset();
+ AshTestBase::TearDown();
+ }
+
private:
// Used to control the |transition_delay_timer_|.
- base::ScopedMockTimeMessageLoopTaskRunner scoped_task_runner_;
+ std::unique_ptr<base::ScopedMockTimeMessageLoopTaskRunner>
+ scoped_task_runner_;
DISALLOW_COPY_AND_ASSIGN(TrayDetailsViewTest);
};
« no previous file with comments | « ash/common/BUILD.gn ('k') | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698