Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/memory/ptr_util.h" |
| 9 #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" | 10 #include "components/exo/wm_helper_ash.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 // Disable window animation when running tests. | 25 // Disable window animation when running tests. |
| 26 command_line->AppendSwitch(wm::switches::kWindowAnimationsDisabled); | 26 command_line->AppendSwitch(wm::switches::kWindowAnimationsDisabled); |
| 27 AshTestBase::SetUp(); | 27 AshTestBase::SetUp(); |
| 28 wm_helper_ = base::MakeUnique<WMHelperAsh>(); | 28 wm_helper_ = base::MakeUnique<WMHelperAsh>(); |
| 29 WMHelper::SetInstance(wm_helper_.get()); | 29 WMHelper::SetInstance(wm_helper_.get()); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void ExoTestBase::TearDown() { | 32 void ExoTestBase::TearDown() { |
| 33 WMHelper::SetInstance(nullptr); | 33 WMHelper::SetInstance(nullptr); |
| 34 wm_helper_.reset(); | 34 wm_helper_.reset(); |
| 35 RunAllPendingInMessageLoop(); | |
|
Fady Samuel
2016/11/30 16:41:57
Add a comment about why this is necessary.
Alex Z.
2016/11/30 20:00:30
This RunAllPendingInMessageLoop() isn't necessary
| |
| 35 AshTestBase::TearDown(); | 36 AshTestBase::TearDown(); |
| 36 } | 37 } |
| 37 | 38 |
| 38 } // namespace test | 39 } // namespace test |
| 39 } // namespace exo | 40 } // namespace exo |
| OLD | NEW |