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 4e93ca80967a2017ebbc375b149b7e8d89b882c4..c8c6d30d245558d6a211e0ada25f7748d0bc8706 100644 |
| --- a/cc/layer_tree_host_unittest_context.cc |
| +++ b/cc/layer_tree_host_unittest_context.cc |
| @@ -780,5 +780,35 @@ class LayerTreeHostContextTestDontUseLostResources : |
| SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources) |
| +class LayerTreeHostContextTestFailsImmediately : public ThreadedTest { |
|
danakj
2013/01/08 01:06:50
Oh, subclass from LayerTreHostContextTest here. An
|
| + public: |
| + LayerTreeHostContextTestFailsImmediately() |
| + : ThreadedTest() { |
| + } |
| + |
| + virtual void beginTest() OVERRIDE { |
| + postSetNeedsCommitToMainThread(); |
| + } |
| + |
| + virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE { |
| + EXPECT_FALSE(succeeded); |
| + // If we make it this far without crashing, we pass! |
| + endTest(); |
| + } |
| + |
| + virtual void afterTest() OVERRIDE { |
| + } |
| + |
| + virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE { |
| + scoped_ptr<FakeWebGraphicsContext3D> context_3d = |
| + FakeWebGraphicsContext3D::Create(); |
| + context_3d->loseContextCHROMIUM(); |
| + return FakeOutputSurface::Create3d( |
| + context_3d.PassAs<WebGraphicsContext3D>()).PassAs<OutputSurface>(); |
| + } |
| +}; |
| + |
| +SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestFailsImmediately); |
| + |
| } // namespace |
| } // namespace cc |