| 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 12 matching lines...) Expand all Loading... |
| 23 class LayerTreeHost; | 23 class LayerTreeHost; |
| 24 class LayerTreeHostClient; | 24 class LayerTreeHostClient; |
| 25 class LayerTreeHostImpl; | 25 class LayerTreeHostImpl; |
| 26 | 26 |
| 27 // Used by test stubs to notify the test when something interesting happens. | 27 // Used by test stubs to notify the test when something interesting happens. |
| 28 class TestHooks : public WebKit::WebAnimationDelegate { | 28 class TestHooks : public WebKit::WebAnimationDelegate { |
| 29 public: | 29 public: |
| 30 TestHooks(); | 30 TestHooks(); |
| 31 virtual ~TestHooks(); | 31 virtual ~TestHooks(); |
| 32 | 32 |
| 33 void ReadSettings(const LayerTreeSettings& settings); |
| 34 |
| 33 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} | 35 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} |
| 34 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 36 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} |
| 35 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) {} | 37 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) {} |
| 36 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, | 38 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, |
| 37 bool success) {} | 39 bool success) {} |
| 38 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 40 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
| 39 LayerTreeHostImpl::FrameData* frame_data, | 41 LayerTreeHostImpl::FrameData* frame_data, |
| 40 bool result); | 42 bool result); |
| 41 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} | 43 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} |
| 42 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} | 44 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ | 180 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ |
| 179 RunTest(true); \ | 181 RunTest(true); \ |
| 180 } \ | 182 } \ |
| 181 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} | 183 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} |
| 182 | 184 |
| 183 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 185 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
| 184 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ | 186 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ |
| 185 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 187 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
| 186 | 188 |
| 187 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 189 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
| OLD | NEW |