| 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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 | 1326 |
| 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 | 1337 |
| 1337 PostSetNeedsCommitToMainThread(); | 1338 PostSetNeedsCommitToMainThread(); |
| 1338 } | 1339 } |
| 1339 | 1340 |
| 1340 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { | 1341 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { |
| 1341 EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize()); | 1342 EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize()); |
| 1342 EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color()); | 1343 EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color()); |
| 1344 EXPECT_TRUE(impl->active_tree()->have_wheel_event_handlers()); |
| 1343 | 1345 |
| 1344 EndTest(); | 1346 EndTest(); |
| 1345 } | 1347 } |
| 1346 | 1348 |
| 1347 void AfterTest() override {} | 1349 void AfterTest() override {} |
| 1348 }; | 1350 }; |
| 1349 | 1351 |
| 1350 MULTI_THREAD_TEST_F(LayerTreeHostTestCommit); | 1352 MULTI_THREAD_TEST_F(LayerTreeHostTestCommit); |
| 1351 | 1353 |
| 1352 // This test verifies that LayerTreeHostImpl's current frame time gets | 1354 // This test verifies that LayerTreeHostImpl's current frame time gets |
| (...skipping 5239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6592 EndTest(); | 6594 EndTest(); |
| 6593 } | 6595 } |
| 6594 | 6596 |
| 6595 void AfterTest() override {} | 6597 void AfterTest() override {} |
| 6596 }; | 6598 }; |
| 6597 | 6599 |
| 6598 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6600 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
| 6599 | 6601 |
| 6600 } // namespace | 6602 } // namespace |
| 6601 } // namespace cc | 6603 } // namespace cc |
| OLD | NEW |