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(); |
danakj
2013/06/05 21:53:32
normally we PostSetNeedsCommitToMainThread() here
|
+ } |
+ |
+ virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE { |
+ return FakeOutputSurface::CreateDeferredGL( |
+ scoped_ptr<WebKit::WebGraphicsContext3D>( |
+ TestWebGraphicsContext3D::Create( |
danakj
2013/06/05 21:53:32
nit: You could just use Create() instead of making
|
+ 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>())); |
danakj
2013/06/05 21:53:32
Maybe it would be worth testing that we actually d
|
+ |
+ PostSetNeedsCommitToMainThread(); |
+ } |
+ |
+ virtual void DidCommitAndDrawFrame() OVERRIDE { |
+ EndTest(); |
+ } |
+ |
+ virtual void AfterTest() OVERRIDE {} |
+}; |
+ |
+MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); |
+ |
} // namespace |
} // namespace cc |