| 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 14 matching lines...) Expand all Loading... |
| 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. | 32 // Whether the test is running under mus. |
| 33 static bool IsMus(); | 33 static bool IsMus(); |
| 34 | 34 |
| 35 // Returns true if running aura-mus in a client configuration (not the window |
| 36 // manager). |
| 37 static bool IsAuraMusClient(); |
| 38 |
| 35 // testing::Test: | 39 // testing::Test: |
| 36 void SetUp() override; | 40 void SetUp() override; |
| 37 void TearDown() override; | 41 void TearDown() override; |
| 38 | 42 |
| 39 void RunPendingMessages(); | 43 void RunPendingMessages(); |
| 40 | 44 |
| 41 // Creates a widget of |type| with any platform specific data for use in | 45 // Creates a widget of |type| with any platform specific data for use in |
| 42 // cross-platform tests. | 46 // cross-platform tests. |
| 43 Widget::InitParams CreateParams(Widget::InitParams::Type type); | 47 Widget::InitParams CreateParams(Widget::InitParams::Type type); |
| 44 | 48 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 #if defined(OS_WIN) | 75 #if defined(OS_WIN) |
| 72 ui::ScopedOleInitializer ole_initializer_; | 76 ui::ScopedOleInitializer ole_initializer_; |
| 73 #endif | 77 #endif |
| 74 | 78 |
| 75 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); | 79 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace views | 82 } // namespace views |
| 79 | 83 |
| 80 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 84 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
| OLD | NEW |