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

Side by Side Diff: components/exo/test/exo_test_base.cc

Issue 2250863003: exo: Run exo in mus+ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build errors Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « components/exo/test/exo_test_base.h ('k') | components/exo/wm_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/exo/test/exo_test_base.h" 5 #include "components/exo/test/exo_test_base.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ptr_util.h"
8 #include "components/exo/test/exo_test_helper.h" 9 #include "components/exo/test/exo_test_helper.h"
10 #include "components/exo/wm_helper_ash.h"
9 #include "ui/wm/core/wm_core_switches.h" 11 #include "ui/wm/core/wm_core_switches.h"
10 12
11 namespace exo { 13 namespace exo {
12 namespace test { 14 namespace test {
13 15
14 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
15 // ExoTestBase, public: 17 // ExoTestBase, public:
16 18
17 ExoTestBase::ExoTestBase() : exo_test_helper_(new ExoTestHelper) {} 19 ExoTestBase::ExoTestBase() : exo_test_helper_(new ExoTestHelper) {}
18 20
19 ExoTestBase::~ExoTestBase() {} 21 ExoTestBase::~ExoTestBase() {}
20 22
21 void ExoTestBase::SetUp() { 23 void ExoTestBase::SetUp() {
22 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 24 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
23 // Disable window animation when running tests. 25 // Disable window animation when running tests.
24 command_line->AppendSwitch(wm::switches::kWindowAnimationsDisabled); 26 command_line->AppendSwitch(wm::switches::kWindowAnimationsDisabled);
25 AshTestBase::SetUp(); 27 AshTestBase::SetUp();
28 wm_helper_ = base::MakeUnique<WMHelperAsh>();
29 WMHelper::SetInstance(wm_helper_.get());
26 } 30 }
27 31
28 void ExoTestBase::TearDown() { 32 void ExoTestBase::TearDown() {
33 WMHelper::SetInstance(nullptr);
34 wm_helper_.reset();
29 AshTestBase::TearDown(); 35 AshTestBase::TearDown();
30 } 36 }
31 37
32 } // namespace test 38 } // namespace test
33 } // namespace exo 39 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/test/exo_test_base.h ('k') | components/exo/wm_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698