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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } | 285 } |
286 | 286 |
287 TEST_F(RenderWidgetCompositorFrameSinkTest, FailOnceBind) { | 287 TEST_F(RenderWidgetCompositorFrameSinkTest, FailOnceBind) { |
288 static_assert( | 288 static_assert( |
289 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK >= | 289 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK >= |
290 2, | 290 2, |
291 "Adjust the values of this test if this fails"); | 291 "Adjust the values of this test if this fails"); |
292 RunTest(false, 1, 1, 0); | 292 RunTest(false, 1, 1, 0); |
293 } | 293 } |
294 | 294 |
| 295 // Android doesn't support fallback frame sinks. (crbug.com/721102) |
| 296 #ifndef OS_ANDROID |
295 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessNull) { | 297 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessNull) { |
296 RunTest(true, | 298 RunTest(true, |
297 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, | 299 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, |
298 0, 1); | 300 0, 1); |
299 } | 301 } |
300 | 302 |
301 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessBind) { | 303 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessBind) { |
302 RunTest(false, | 304 RunTest(false, |
303 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, | 305 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, |
304 0, 1); | 306 0, 1); |
305 } | 307 } |
306 | 308 |
307 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessNormalSuccess) { | 309 TEST_F(RenderWidgetCompositorFrameSinkTest, FallbackSuccessNormalSuccess) { |
308 // The first success is a fallback, but the next should not be a fallback. | 310 // The first success is a fallback, but the next should not be a fallback. |
309 RunTest(false, | 311 RunTest(false, |
310 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, | 312 RenderWidgetCompositor::COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK, |
311 1, 1); | 313 1, 1); |
312 } | 314 } |
| 315 #endif |
313 | 316 |
314 } // namespace | 317 } // namespace |
315 } // namespace content | 318 } // namespace content |
OLD | NEW |