| 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 #include "cc/test/layer_tree_test_common.h" | 5 #include "cc/test/layer_tree_test_common.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "cc/active_animation.h" | 8 #include "cc/active_animation.h" |
| 9 #include "cc/content_layer.h" | 9 #include "cc/content_layer.h" |
| 10 #include "cc/font_atlas.h" |
| 10 #include "cc/input_handler.h" | 11 #include "cc/input_handler.h" |
| 11 #include "cc/layer.h" | 12 #include "cc/layer.h" |
| 12 #include "cc/layer_animation_controller.h" | 13 #include "cc/layer_animation_controller.h" |
| 13 #include "cc/layer_impl.h" | 14 #include "cc/layer_impl.h" |
| 14 #include "cc/layer_tree_host_impl.h" | 15 #include "cc/layer_tree_host_impl.h" |
| 15 #include "cc/scoped_thread_proxy.h" | 16 #include "cc/scoped_thread_proxy.h" |
| 16 #include "cc/single_thread_proxy.h" | 17 #include "cc/single_thread_proxy.h" |
| 17 #include "cc/thread_impl.h" | 18 #include "cc/thread_impl.h" |
| 18 #include "cc/test/animation_test_common.h" | 19 #include "cc/test/animation_test_common.h" |
| 19 #include "cc/test/fake_web_compositor_output_surface.h" | 20 #include "cc/test/fake_web_compositor_output_surface.h" |
| 20 #include "cc/test/fake_web_graphics_context_3d.h" | 21 #include "cc/test/fake_web_graphics_context_3d.h" |
| 21 #include "cc/test/occlusion_tracker_test_common.h" | 22 #include "cc/test/occlusion_tracker_test_common.h" |
| 22 #include "cc/test/tiled_layer_test_common.h" | 23 #include "cc/test/tiled_layer_test_common.h" |
| 23 #include "cc/timing_function.h" | 24 #include "cc/timing_function.h" |
| 24 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
| 25 #include <public/WebFilterOperation.h> | 26 #include <public/WebFilterOperation.h> |
| 26 #include <public/WebFilterOperations.h> | 27 #include <public/WebFilterOperations.h> |
| 27 | 28 |
| 29 using cc::FontAtlas; |
| 28 using cc::InputHandler; | 30 using cc::InputHandler; |
| 29 using cc::Layer; | 31 using cc::Layer; |
| 30 using cc::LayerTreeHostImplClient; | 32 using cc::LayerTreeHostImplClient; |
| 31 using cc::LayerTreeSettings; | 33 using cc::LayerTreeSettings; |
| 32 using cc::Proxy; | 34 using cc::Proxy; |
| 33 using cc::ScopedThreadProxy; | 35 using cc::ScopedThreadProxy; |
| 34 | 36 |
| 35 using namespace WebKit; | 37 using namespace WebKit; |
| 36 | 38 |
| 37 namespace WebKitTests { | 39 namespace WebKitTests { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 258 |
| 257 virtual void didCompleteSwapBuffers() OVERRIDE | 259 virtual void didCompleteSwapBuffers() OVERRIDE |
| 258 { | 260 { |
| 259 } | 261 } |
| 260 | 262 |
| 261 virtual void scheduleComposite() OVERRIDE | 263 virtual void scheduleComposite() OVERRIDE |
| 262 { | 264 { |
| 263 m_testHooks->scheduleComposite(); | 265 m_testHooks->scheduleComposite(); |
| 264 } | 266 } |
| 265 | 267 |
| 268 virtual scoped_ptr<FontAtlas> createFontAtlas() OVERRIDE |
| 269 { |
| 270 return scoped_ptr<FontAtlas>(); |
| 271 } |
| 272 |
| 266 private: | 273 private: |
| 267 explicit ThreadedMockLayerTreeHostClient(TestHooks* testHooks) : m_testHooks
(testHooks) { } | 274 explicit ThreadedMockLayerTreeHostClient(TestHooks* testHooks) : m_testHooks
(testHooks) { } |
| 268 | 275 |
| 269 TestHooks* m_testHooks; | 276 TestHooks* m_testHooks; |
| 270 }; | 277 }; |
| 271 | 278 |
| 272 ThreadedTest::ThreadedTest() | 279 ThreadedTest::ThreadedTest() |
| 273 : m_beginning(false) | 280 : m_beginning(false) |
| 274 , m_endWhenBeginReturns(false) | 281 , m_endWhenBeginReturns(false) |
| 275 , m_timedOut(false) | 282 , m_timedOut(false) |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 ASSERT_FALSE(m_layerTreeHost.get()); | 531 ASSERT_FALSE(m_layerTreeHost.get()); |
| 525 m_client.reset(); | 532 m_client.reset(); |
| 526 if (m_timedOut) { | 533 if (m_timedOut) { |
| 527 FAIL() << "Test timed out"; | 534 FAIL() << "Test timed out"; |
| 528 return; | 535 return; |
| 529 } | 536 } |
| 530 afterTest(); | 537 afterTest(); |
| 531 } | 538 } |
| 532 | 539 |
| 533 } // namespace WebKitTests | 540 } // namespace WebKitTests |
| OLD | NEW |