| 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 // This test verifies that properties on the layer tree host are commited | 1327 // This test verifies that properties on the layer tree host are commited |
| 1328 // to the impl side. | 1328 // to the impl side. |
| 1329 class LayerTreeHostTestCommit : public LayerTreeHostTest { | 1329 class LayerTreeHostTestCommit : public LayerTreeHostTest { |
| 1330 public: | 1330 public: |
| 1331 LayerTreeHostTestCommit() {} | 1331 LayerTreeHostTestCommit() {} |
| 1332 | 1332 |
| 1333 void BeginTest() override { | 1333 void BeginTest() override { |
| 1334 layer_tree_host()->SetViewportSize(gfx::Size(20, 20)); | 1334 layer_tree_host()->SetViewportSize(gfx::Size(20, 20)); |
| 1335 layer_tree_host()->set_background_color(SK_ColorGRAY); | 1335 layer_tree_host()->set_background_color(SK_ColorGRAY); |
| 1336 layer_tree_host()->SetHaveWheelEventHandlers(true); | 1336 layer_tree_host()->SetHaveWheelEventHandlers(true); |
| 1337 layer_tree_host()->SetHaveScrollEventHandlers(true); |
| 1337 | 1338 |
| 1338 PostSetNeedsCommitToMainThread(); | 1339 PostSetNeedsCommitToMainThread(); |
| 1339 } | 1340 } |
| 1340 | 1341 |
| 1341 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { | 1342 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { |
| 1342 EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize()); | 1343 EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize()); |
| 1343 EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color()); | 1344 EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color()); |
| 1344 EXPECT_TRUE(impl->active_tree()->have_wheel_event_handlers()); | 1345 EXPECT_TRUE(impl->active_tree()->have_wheel_event_handlers()); |
| 1346 EXPECT_TRUE(impl->active_tree()->have_scroll_event_handlers()); |
| 1345 | 1347 |
| 1346 EndTest(); | 1348 EndTest(); |
| 1347 } | 1349 } |
| 1348 | 1350 |
| 1349 void AfterTest() override {} | 1351 void AfterTest() override {} |
| 1350 }; | 1352 }; |
| 1351 | 1353 |
| 1352 MULTI_THREAD_TEST_F(LayerTreeHostTestCommit); | 1354 MULTI_THREAD_TEST_F(LayerTreeHostTestCommit); |
| 1353 | 1355 |
| 1354 // This test verifies that LayerTreeHostImpl's current frame time gets | 1356 // This test verifies that LayerTreeHostImpl's current frame time gets |
| (...skipping 5239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6594 EndTest(); | 6596 EndTest(); |
| 6595 } | 6597 } |
| 6596 | 6598 |
| 6597 void AfterTest() override {} | 6599 void AfterTest() override {} |
| 6598 }; | 6600 }; |
| 6599 | 6601 |
| 6600 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6602 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
| 6601 | 6603 |
| 6602 } // namespace | 6604 } // namespace |
| 6603 } // namespace cc | 6605 } // namespace cc |
| OLD | NEW |