| 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 #include "ui/views/test/views_test_base.h" | 5 #include "ui/views/test/views_test_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 << "You have overridden SetUp but never called super class's SetUp"; | 57 << "You have overridden SetUp but never called super class's SetUp"; |
| 58 CHECK(teardown_called_) | 58 CHECK(teardown_called_) |
| 59 << "You have overridden TearDown but never called super class's TearDown"; | 59 << "You have overridden TearDown but never called super class's TearDown"; |
| 60 } | 60 } |
| 61 | 61 |
| 62 // static | 62 // static |
| 63 bool ViewsTestBase::IsMus() { | 63 bool ViewsTestBase::IsMus() { |
| 64 return PlatformTestHelper::IsMus(); | 64 return PlatformTestHelper::IsMus(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // static |
| 68 bool ViewsTestBase::IsAuraMusClient() { |
| 69 return PlatformTestHelper::IsAuraMusClient(); |
| 70 } |
| 71 |
| 67 void ViewsTestBase::SetUp() { | 72 void ViewsTestBase::SetUp() { |
| 68 testing::Test::SetUp(); | 73 testing::Test::SetUp(); |
| 69 // ContentTestSuiteBase might have already initialized | 74 // ContentTestSuiteBase might have already initialized |
| 70 // MaterialDesignController in unit_tests suite. | 75 // MaterialDesignController in unit_tests suite. |
| 71 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); | 76 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); |
| 72 ui::MaterialDesignController::Initialize(); | 77 ui::MaterialDesignController::Initialize(); |
| 73 setup_called_ = true; | 78 setup_called_ = true; |
| 74 if (!views_delegate_for_setup_) | 79 if (!views_delegate_for_setup_) |
| 75 views_delegate_for_setup_.reset(new TestViewsDelegate()); | 80 views_delegate_for_setup_.reset(new TestViewsDelegate()); |
| 76 | 81 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 103 | 108 |
| 104 gfx::NativeWindow ViewsTestBase::GetContext() { | 109 gfx::NativeWindow ViewsTestBase::GetContext() { |
| 105 return test_helper_->GetContext(); | 110 return test_helper_->GetContext(); |
| 106 } | 111 } |
| 107 | 112 |
| 108 bool ViewsTestBase::HasCompositingManager() const { | 113 bool ViewsTestBase::HasCompositingManager() const { |
| 109 return has_compositing_manager_; | 114 return has_compositing_manager_; |
| 110 } | 115 } |
| 111 | 116 |
| 112 } // namespace views | 117 } // namespace views |
| OLD | NEW |