Chromium Code Reviews| Index: cc/layer_tree_host_unittest_context.cc |
| diff --git a/cc/layer_tree_host_unittest_context.cc b/cc/layer_tree_host_unittest_context.cc |
| index ac267c0254997363f75f3b4ca1cad80fb3f89676..3e0e35ccfda8bb5607a2998a8c5e331edfd49c01 100644 |
| --- a/cc/layer_tree_host_unittest_context.cc |
| +++ b/cc/layer_tree_host_unittest_context.cc |
| @@ -13,6 +13,7 @@ |
| #include "cc/layer_impl.h" |
| #include "cc/layer_tree_host_impl.h" |
| #include "cc/layer_tree_impl.h" |
| +#include "cc/picture_layer.h" |
| #include "cc/scrollbar_layer.h" |
| #include "cc/single_thread_proxy.h" |
| #include "cc/test/fake_content_layer.h" |
| @@ -812,5 +813,50 @@ class LayerTreeHostContextTestFailsImmediately : |
| SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestFailsImmediately); |
| +class ImplSidePaintingLayerTreeHostContextTest |
|
enne (OOO)
2013/01/15 22:35:41
How would this test fail before your patch?
I was
reveman
2013/01/15 23:16:26
The DCHECK(tiles_.size() == 0) in the tile manager
|
| + : public LayerTreeHostContextTest { |
| + public: |
| + virtual void initializeSettings(LayerTreeSettings& settings) OVERRIDE { |
| + settings.implSidePainting = true; |
| + } |
| +}; |
| + |
| +class LayerTreeHostContextTestImplSidePainting : |
| + public ImplSidePaintingLayerTreeHostContextTest { |
| + public: |
| + virtual void setupTree() OVERRIDE { |
| + scoped_refptr<Layer> root = Layer::create(); |
| + root->setBounds(gfx::Size(10, 10)); |
| + root->setAnchorPoint(gfx::PointF()); |
| + root->setIsDrawable(true); |
| + |
| + scoped_refptr<PictureLayer> picture = PictureLayer::create(&client_); |
| + picture->setBounds(gfx::Size(10, 10)); |
| + picture->setAnchorPoint(gfx::PointF()); |
| + picture->setIsDrawable(true); |
| + root->addChild(picture); |
| + |
| + m_layerTreeHost->setRootLayer(root); |
| + LayerTreeHostContextTest::setupTree(); |
| + } |
| + |
| + virtual void beginTest() OVERRIDE { |
| + times_to_lose_during_commit_ = 1; |
| + postSetNeedsCommitToMainThread(); |
| + } |
| + |
| + virtual void afterTest() OVERRIDE {} |
| + |
| + virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE { |
| + EXPECT_TRUE(succeeded); |
| + endTest(); |
| + } |
| + |
| + private: |
| + FakeContentLayerClient client_; |
| +}; |
| + |
| +MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting) |
| + |
| } // namespace |
| } // namespace cc |