Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: cc/layer_tree_host_unittest_context.cc

Issue 11782026: ThreadedTest that a non-null OutputSurface that fails initialization immediately doesn't crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar subclass Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/thread_proxy.cc » ('j') | cc/thread_proxy.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 :
784 public LayerTreeHostContextTest {
785 public:
786 LayerTreeHostContextTestFailsImmediately()
787 : LayerTreeHostContextTest() {
788 }
789
790 virtual ~LayerTreeHostContextTestFailsImmediately() {}
791
792 virtual void beginTest() OVERRIDE {
793 postSetNeedsCommitToMainThread();
794 }
795
796 virtual void afterTest() OVERRIDE {
797 }
798
799 virtual scoped_ptr<FakeWebGraphicsContext3D> CreateContext3d() OVERRIDE {
800 scoped_ptr<FakeWebGraphicsContext3D> context =
801 LayerTreeHostContextTest::CreateContext3d();
802 context->loseContextCHROMIUM();
803 return context.Pass();
804 }
805
806 virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE {
807 EXPECT_FALSE(succeeded);
808 // If we make it this far without crashing, we pass!
809 endTest();
810 }
811 };
812
813 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestFailsImmediately);
814
783 } // namespace 815 } // namespace
784 } // namespace cc 816 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/thread_proxy.cc » ('j') | cc/thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698