| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 ViewsTestBase::ViewsTestBase() | 50 ViewsTestBase::ViewsTestBase() |
| 51 : setup_called_(false), | 51 : setup_called_(false), |
| 52 teardown_called_(false), | 52 teardown_called_(false), |
| 53 has_compositing_manager_(InitializeVisuals()) {} | 53 has_compositing_manager_(InitializeVisuals()) {} |
| 54 | 54 |
| 55 ViewsTestBase::~ViewsTestBase() { | 55 ViewsTestBase::~ViewsTestBase() { |
| 56 CHECK(setup_called_) | 56 // You have overridden SetUp but never called super class's SetUp |
| 57 << "You have overridden SetUp but never called super class's SetUp"; | 57 CHECK(setup_called_); |
| 58 CHECK(teardown_called_) | 58 // You have overridden TearDown but never called super class's TearDown |
| 59 << "You have overridden TearDown but never called super class's TearDown"; | 59 CHECK(teardown_called_); |
| 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 | 67 // static |
| 68 bool ViewsTestBase::IsAuraMusClient() { | 68 bool ViewsTestBase::IsAuraMusClient() { |
| 69 return PlatformTestHelper::IsAuraMusClient(); | 69 return PlatformTestHelper::IsAuraMusClient(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 void ViewsTestBase::SimulateNativeDestroy(Widget* widget) { | 113 void ViewsTestBase::SimulateNativeDestroy(Widget* widget) { |
| 114 test_helper_->platform_test_helper()->SimulateNativeDestroy(widget); | 114 test_helper_->platform_test_helper()->SimulateNativeDestroy(widget); |
| 115 } | 115 } |
| 116 | 116 |
| 117 gfx::NativeWindow ViewsTestBase::GetContext() { | 117 gfx::NativeWindow ViewsTestBase::GetContext() { |
| 118 return test_helper_->GetContext(); | 118 return test_helper_->GetContext(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace views | 121 } // namespace views |
| OLD | NEW |