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

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

Issue 2694623016: chromeos: Makes AshTestBase/Helper target mash when appropriate (Closed)
Patch Set: 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/accelerators/accelerator_controller_unittest.cc ('k') | ash/common/test/ash_test.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 a62f8b64dab09e3e05c643d89959dbc8b2695ad6..246d5e832b658fc068a0e830196cc15e43d6d9a0 100644
--- a/ash/common/system/tray/tray_details_view_unittest.cc
+++ b/ash/common/system/tray/tray_details_view_unittest.cc
@@ -12,6 +12,7 @@
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_popup_header_button.h"
#include "ash/common/system/tray/view_click_listener.h"
+#include "ash/common/wm_shell.h"
#include "ash/test/ash_test_base.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
@@ -126,17 +127,30 @@ class TrayDetailsViewTest : public AshTestBase {
void TransitionFromDetailedToDefaultView(TestDetailsView* detailed) {
detailed->TransitionToDefaultView();
- scoped_task_runner_->FastForwardBy(base::TimeDelta::FromMilliseconds(
- GetTrayConstant(TRAY_POPUP_TRANSITION_TO_DEFAULT_DELAY)));
+ (*scoped_task_runner_)
+ ->FastForwardBy(base::TimeDelta::FromMilliseconds(
+ GetTrayConstant(TRAY_POPUP_TRANSITION_TO_DEFAULT_DELAY)));
}
void FocusBackButton(TestDetailsView* detailed) {
detailed->back_button_->RequestFocus();
}
+ void SetUp() override {
+ AshTestBase::SetUp();
+ scoped_task_runner_ =
sky 2017/02/17 18:22:15 This needs to be created *after* the SequencedWork
+ 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/accelerators/accelerator_controller_unittest.cc ('k') | ash/common/test/ash_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698