| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include "cc/output/begin_frame_args.h" | 7 #include "cc/output/begin_frame_args.h" |
| 8 #include "cc/test/failure_output_surface.h" | 8 #include "cc/test/failure_output_surface.h" |
| 9 #include "cc/trees/layer_tree_host.h" | 9 #include "cc/trees/layer_tree_host.h" |
| 10 #include "components/scheduler/renderer/renderer_scheduler.h" | 10 #include "components/scheduler/renderer/renderer_scheduler.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 public: | 50 public: |
| 51 RenderWidgetCompositorTest() | 51 RenderWidgetCompositorTest() |
| 52 : render_widget_(make_scoped_refptr(new TestRenderWidget())), | 52 : render_widget_(make_scoped_refptr(new TestRenderWidget())), |
| 53 compositor_deps_(make_scoped_ptr(new FakeCompositorDependencies)), | 53 compositor_deps_(make_scoped_ptr(new FakeCompositorDependencies)), |
| 54 render_widget_compositor_( | 54 render_widget_compositor_( |
| 55 RenderWidgetCompositor::Create(render_widget_.get(), | 55 RenderWidgetCompositor::Create(render_widget_.get(), |
| 56 compositor_deps_.get())) {} | 56 compositor_deps_.get())) {} |
| 57 ~RenderWidgetCompositorTest() override {} | 57 ~RenderWidgetCompositorTest() override {} |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 base::MessageLoop loop_; |
| 60 MockRenderThread render_thread_; | 61 MockRenderThread render_thread_; |
| 61 scoped_refptr<TestRenderWidget> render_widget_; | 62 scoped_refptr<TestRenderWidget> render_widget_; |
| 62 scoped_ptr<FakeCompositorDependencies> compositor_deps_; | 63 scoped_ptr<FakeCompositorDependencies> compositor_deps_; |
| 63 scoped_ptr<RenderWidgetCompositor> render_widget_compositor_; | 64 scoped_ptr<RenderWidgetCompositor> render_widget_compositor_; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 DISALLOW_COPY_AND_ASSIGN(RenderWidgetCompositorTest); | 67 DISALLOW_COPY_AND_ASSIGN(RenderWidgetCompositorTest); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 TEST_F(RenderWidgetCompositorTest, BeginMainFrame) { | 70 TEST_F(RenderWidgetCompositorTest, BeginMainFrame) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 310 } |
| 310 | 311 |
| 311 TEST_F(RenderWidgetCompositorOutputSurfaceTest, FallbackSuccessNormalSuccess) { | 312 TEST_F(RenderWidgetCompositorOutputSurfaceTest, FallbackSuccessNormalSuccess) { |
| 312 // The first success is a fallback, but the next should not be a fallback. | 313 // The first success is a fallback, but the next should not be a fallback. |
| 313 RunTest(false, RenderWidgetCompositor::OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK, | 314 RunTest(false, RenderWidgetCompositor::OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK, |
| 314 1, 1); | 315 1, 1); |
| 315 } | 316 } |
| 316 | 317 |
| 317 } // namespace | 318 } // namespace |
| 318 } // namespace content | 319 } // namespace content |
| OLD | NEW |