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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "cc/animation/keyframed_animation_curve.h" | 8 #include "cc/animation/keyframed_animation_curve.h" |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true)); | 623 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true)); |
624 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion( | 624 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion( |
625 Region(gfx::Rect(1, 1, 2, 2)))); | 625 Region(gfx::Rect(1, 1, 2, 2)))); |
626 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true)); | 626 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true)); |
627 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveScrollEventHandlers(true)); | 627 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveScrollEventHandlers(true)); |
628 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform( | 628 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform( |
629 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); | 629 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); |
630 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false)); | 630 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false)); |
631 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTouchEventHandlerRegion( | 631 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTouchEventHandlerRegion( |
632 gfx::Rect(10, 10))); | 632 gfx::Rect(10, 10))); |
633 EXPECT_SET_NEEDS_COMMIT( | |
634 1, | |
635 test_layer->SetDrawCheckerboardForMissingTiles( | |
636 !test_layer->draw_checkerboard_for_missing_tiles())); | |
637 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true)); | 633 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true)); |
638 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHideLayerAndSubtree(true)); | 634 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHideLayerAndSubtree(true)); |
639 | 635 |
640 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer( | 636 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer( |
641 dummy_layer1.get())); | 637 dummy_layer1.get())); |
642 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer( | 638 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer( |
643 dummy_layer2.get())); | 639 dummy_layer2.get())); |
644 | 640 |
645 // The above tests should not have caused a change to the needs_display flag. | 641 // The above tests should not have caused a change to the needs_display flag. |
646 EXPECT_FALSE(test_layer->NeedsDisplayForTesting()); | 642 EXPECT_FALSE(test_layer->NeedsDisplayForTesting()); |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 // When the layer is destroyed, the other three requests should be aborted. | 1321 // When the layer is destroyed, the other three requests should be aborted. |
1326 layer = nullptr; | 1322 layer = nullptr; |
1327 EXPECT_EQ(1, did_receive_first_result_from_this_source); | 1323 EXPECT_EQ(1, did_receive_first_result_from_this_source); |
1328 EXPECT_EQ(1, did_receive_result_from_different_source); | 1324 EXPECT_EQ(1, did_receive_result_from_different_source); |
1329 EXPECT_EQ(1, did_receive_result_from_anonymous_source); | 1325 EXPECT_EQ(1, did_receive_result_from_anonymous_source); |
1330 EXPECT_EQ(1, did_receive_second_result_from_this_source); | 1326 EXPECT_EQ(1, did_receive_second_result_from_this_source); |
1331 } | 1327 } |
1332 | 1328 |
1333 } // namespace | 1329 } // namespace |
1334 } // namespace cc | 1330 } // namespace cc |
OLD | NEW |