Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "cc/content_layer.h" | 8 #include "cc/content_layer.h" |
| 9 #include "cc/delegated_renderer_layer.h" | 9 #include "cc/delegated_renderer_layer.h" |
| 10 #include "cc/delegated_renderer_layer_impl.h" | 10 #include "cc/delegated_renderer_layer_impl.h" |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 773 scoped_refptr<VideoFrame> hw_video_frame_; | 773 scoped_refptr<VideoFrame> hw_video_frame_; |
| 774 scoped_refptr<VideoFrame> scaled_hw_video_frame_; | 774 scoped_refptr<VideoFrame> scaled_hw_video_frame_; |
| 775 | 775 |
| 776 FakeVideoFrameProvider color_frame_provider_; | 776 FakeVideoFrameProvider color_frame_provider_; |
| 777 FakeVideoFrameProvider hw_frame_provider_; | 777 FakeVideoFrameProvider hw_frame_provider_; |
| 778 FakeVideoFrameProvider scaled_hw_frame_provider_; | 778 FakeVideoFrameProvider scaled_hw_frame_provider_; |
| 779 }; | 779 }; |
| 780 | 780 |
| 781 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources) | 781 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources) |
| 782 | 782 |
| 783 class LayerTreeHostContextTestFailsImmediately : public ThreadedTest { | |
|
danakj
2013/01/08 01:06:50
Oh, subclass from LayerTreHostContextTest here. An
| |
| 784 public: | |
| 785 LayerTreeHostContextTestFailsImmediately() | |
| 786 : ThreadedTest() { | |
| 787 } | |
| 788 | |
| 789 virtual void beginTest() OVERRIDE { | |
| 790 postSetNeedsCommitToMainThread(); | |
| 791 } | |
| 792 | |
| 793 virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE { | |
| 794 EXPECT_FALSE(succeeded); | |
| 795 // If we make it this far without crashing, we pass! | |
| 796 endTest(); | |
| 797 } | |
| 798 | |
| 799 virtual void afterTest() OVERRIDE { | |
| 800 } | |
| 801 | |
| 802 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE { | |
| 803 scoped_ptr<FakeWebGraphicsContext3D> context_3d = | |
| 804 FakeWebGraphicsContext3D::Create(); | |
| 805 context_3d->loseContextCHROMIUM(); | |
| 806 return FakeOutputSurface::Create3d( | |
| 807 context_3d.PassAs<WebGraphicsContext3D>()).PassAs<OutputSurface>(); | |
| 808 } | |
| 809 }; | |
| 810 | |
| 811 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestFailsImmediately); | |
| 812 | |
| 783 } // namespace | 813 } // namespace |
| 784 } // namespace cc | 814 } // namespace cc |
| OLD | NEW |