| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
| 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace views { | 23 namespace views { |
| 24 | 24 |
| 25 // A base class for views unit test. It creates a message loop necessary | 25 // A base class for views unit test. It creates a message loop necessary |
| 26 // to drive UI events and takes care of OLE initialization for windows. | 26 // to drive UI events and takes care of OLE initialization for windows. |
| 27 class ViewsTestBase : public PlatformTest { | 27 class ViewsTestBase : public PlatformTest { |
| 28 public: | 28 public: |
| 29 ViewsTestBase(); | 29 ViewsTestBase(); |
| 30 ~ViewsTestBase() override; | 30 ~ViewsTestBase() override; |
| 31 | 31 |
| 32 // Whether the test is running under mus. | |
| 33 static bool IsMus(); | |
| 34 | |
| 35 // Returns true if running aura-mus in a client configuration (not the window | 32 // Returns true if running aura-mus in a client configuration (not the window |
| 36 // manager). | 33 // manager). |
| 37 static bool IsAuraMusClient(); | 34 static bool IsMus(); |
| 38 | 35 |
| 39 // testing::Test: | 36 // testing::Test: |
| 40 void SetUp() override; | 37 void SetUp() override; |
| 41 void TearDown() override; | 38 void TearDown() override; |
| 42 | 39 |
| 43 void RunPendingMessages(); | 40 void RunPendingMessages(); |
| 44 | 41 |
| 45 // Creates a widget of |type| with any platform specific data for use in | 42 // Creates a widget of |type| with any platform specific data for use in |
| 46 // cross-platform tests. | 43 // cross-platform tests. |
| 47 Widget::InitParams CreateParams(Widget::InitParams::Type type); | 44 Widget::InitParams CreateParams(Widget::InitParams::Type type); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 78 #if defined(OS_WIN) | 75 #if defined(OS_WIN) |
| 79 ui::ScopedOleInitializer ole_initializer_; | 76 ui::ScopedOleInitializer ole_initializer_; |
| 80 #endif | 77 #endif |
| 81 | 78 |
| 82 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); | 79 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); |
| 83 }; | 80 }; |
| 84 | 81 |
| 85 } // namespace views | 82 } // namespace views |
| 86 | 83 |
| 87 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 84 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
| OLD | NEW |