Chromium Code Reviews| Index: cc/trees/layer_tree_host_unittest.cc |
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc |
| index 1fd7f6e2355bf15323858f310a34e2dbf61f7a9a..935abb71a816ea974d83ceefd0726e9a4039fbdd 100644 |
| --- a/cc/trees/layer_tree_host_unittest.cc |
| +++ b/cc/trees/layer_tree_host_unittest.cc |
| @@ -529,7 +529,8 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest { |
| scoped_refptr<ContentLayer> root_layer_; |
| }; |
| -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSetNextCommitForcesRedraw); |
| +SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F( |
| + LayerTreeHostTestSetNextCommitForcesRedraw); |
| // Tests that if a layer is not drawn because of some reason in the parent then |
| // its damage is preserved until the next time it is drawn. |
| @@ -737,7 +738,8 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails |
| virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
| EXPECT_EQ(frame_count_with_pending_tree_, 0); |
| - impl->BlockNotifyReadyToActivateForTesting(true); |
| + if (impl->settings().impl_side_painting) |
| + impl->BlockNotifyReadyToActivateForTesting(true); |
| } |
| virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl, |
| @@ -748,7 +750,8 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails |
| if (frame_count_with_pending_tree_ == 1) { |
| EXPECT_EQ(first_frame_time_.ToInternalValue(), 0); |
| first_frame_time_ = impl->CurrentBeginFrameArgs().frame_time; |
| - } else if (frame_count_with_pending_tree_ == 2) { |
| + } else if (frame_count_with_pending_tree_ == 2 && |
| + impl->settings().impl_side_painting) { |
| impl->BlockNotifyReadyToActivateForTesting(false); |
| } |
| } |
| @@ -777,7 +780,7 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails |
| base::TimeTicks first_frame_time_; |
| }; |
| -SINGLE_AND_MULTI_THREAD_TEST_F( |
| +SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F( |
| LayerTreeHostTestFrameTimeUpdatesAfterActivationFails); |
| // This test verifies that LayerTreeHostImpl's current frame time gets |
| @@ -2219,7 +2222,7 @@ class LayerTreeHostTestLCDNotification : public LayerTreeHostTest { |
| NotificationClient client_; |
| }; |
| -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestLCDNotification); |
| +SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostTestLCDNotification); |
|
danakj
2014/09/03 21:14:24
Why is this happening?
enne (OOO)
2014/09/03 21:36:25
Fixed. OOPS.
|
| // Verify that the BeginFrame notification is used to initiate rendering. |
| class LayerTreeHostTestBeginFrameNotification : public LayerTreeHostTest { |
| @@ -2403,12 +2406,18 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents |
| LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {} |
| virtual void SetupTree() OVERRIDE { |
| - scoped_refptr<ContentLayer> root_layer = ContentLayer::Create(&client_); |
| + if (layer_tree_host()->settings().impl_side_painting) { |
| + scoped_refptr<PictureLayer> root_layer = PictureLayer::Create(&client_); |
| + layer_tree_host()->SetRootLayer(root_layer); |
| + } else { |
| + scoped_refptr<ContentLayer> root_layer = ContentLayer::Create(&client_); |
| + layer_tree_host()->SetRootLayer(root_layer); |
| + } |
| + Layer* root_layer = layer_tree_host()->root_layer(); |
| root_layer->SetIsDrawable(true); |
| root_layer->SetBounds(gfx::Size(1, 1)); |
| - layer_tree_host()->SetRootLayer(root_layer); |
| - client_.set_layer(root_layer.get()); |
| + client_.set_layer(root_layer); |
| LayerTreeHostTest::SetupTree(); |
| } |
| @@ -2416,7 +2425,7 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents |
| virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } |
| virtual void AfterTest() OVERRIDE {} |
| - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
| + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
| num_commits_++; |
| if (num_commits_ == 1) { |
| LayerImpl* root_layer = host_impl->active_tree()->root_layer(); |
| @@ -2433,7 +2442,8 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents |
| int num_commits_; |
| }; |
| -SINGLE_THREAD_TEST_F(LayerTreeHostTestChangeLayerPropertiesInPaintContents); |
| +SINGLE_AND_MULTI_THREAD_TEST_F( |
| + LayerTreeHostTestChangeLayerPropertiesInPaintContents); |
| class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D { |
| public: |