| 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 65b8e2454a8254e9a14021b3cb72d6d40016c70f..2817182b13edfc87aeda6eace3d1dbdde9877392 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -2878,5 +2878,38 @@ TEST_F(LayerTreeHostTestNumFramesPending, GLRenderer) {
|
| RunTest(true, false, true);
|
| }
|
|
|
| +class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
|
| + public:
|
| + virtual void BeginTest() OVERRIDE {
|
| + layer_tree_host()->SetNeedsRedraw();
|
| + }
|
| +
|
| + virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE {
|
| + return FakeOutputSurface::CreateDeferredGL(
|
| + scoped_ptr<WebKit::WebGraphicsContext3D>(
|
| + TestWebGraphicsContext3D::Create(
|
| + WebKit::WebGraphicsContext3D::Attributes())),
|
| + scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice))
|
| + .PassAs<OutputSurface>();
|
| + }
|
| +
|
| + virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
|
| + bool success) OVERRIDE {
|
| + EXPECT_TRUE(success);
|
| + EXPECT_TRUE(
|
| + host_impl->DeferredInitialize(scoped_refptr<ContextProvider>()));
|
| +
|
| + PostSetNeedsCommitToMainThread();
|
| + }
|
| +
|
| + virtual void DidCommitAndDrawFrame() OVERRIDE {
|
| + EndTest();
|
| + }
|
| +
|
| + virtual void AfterTest() OVERRIDE {}
|
| +};
|
| +
|
| +MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize);
|
| +
|
| } // namespace
|
| } // namespace cc
|
|
|