| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CC_TEST_LAYER_TREE_TEST_H_ | 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_ |
| 6 #define CC_TEST_LAYER_TREE_TEST_H_ | 6 #define CC_TEST_LAYER_TREE_TEST_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "cc/base/thread.h" | 10 #include "cc/base/thread.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 virtual void RunTest(bool threaded); | 139 virtual void RunTest(bool threaded); |
| 140 | 140 |
| 141 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; } | 141 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; } |
| 142 Proxy* proxy() const { | 142 Proxy* proxy() const { |
| 143 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL; | 143 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL; |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool TestEnded() const { return ended_; } | 146 bool TestEnded() const { return ended_; } |
| 147 | 147 |
| 148 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } | 148 LayerTreeHost* layer_tree_host(); |
| 149 | 149 |
| 150 private: | 150 private: |
| 151 LayerTreeSettings settings_; | 151 LayerTreeSettings settings_; |
| 152 scoped_ptr<LayerTreeHostClientForTesting> client_; | 152 scoped_ptr<LayerTreeHostClientForTesting> client_; |
| 153 scoped_ptr<LayerTreeHost> layer_tree_host_; | 153 scoped_ptr<LayerTreeHost> layer_tree_host_; |
| 154 | 154 |
| 155 bool beginning_; | 155 bool beginning_; |
| 156 bool end_when_begin_returns_; | 156 bool end_when_begin_returns_; |
| 157 bool timed_out_; | 157 bool timed_out_; |
| 158 bool scheduled_; | 158 bool scheduled_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 182 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ | 182 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ |
| 183 RunTest(true); \ | 183 RunTest(true); \ |
| 184 } \ | 184 } \ |
| 185 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} | 185 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} |
| 186 | 186 |
| 187 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 187 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
| 188 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ | 188 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ |
| 189 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 189 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
| 190 | 190 |
| 191 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 191 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
| OLD | NEW |