OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <utility> |
6 | 7 |
7 #include "base/barrier_closure.h" | 8 #include "base/barrier_closure.h" |
8 #include "base/command_line.h" | 9 #include "base/command_line.h" |
9 #include "base/location.h" | 10 #include "base/location.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
13 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
15 #include "build/build_config.h" | 16 #include "build/build_config.h" |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 MAYBE_FrameSubscriberTest) { | 342 MAYBE_FrameSubscriberTest) { |
342 SET_UP_SURFACE_OR_PASS_TEST(NULL); | 343 SET_UP_SURFACE_OR_PASS_TEST(NULL); |
343 RenderWidgetHostViewBase* const view = GetRenderWidgetHostView(); | 344 RenderWidgetHostViewBase* const view = GetRenderWidgetHostView(); |
344 | 345 |
345 base::RunLoop run_loop; | 346 base::RunLoop run_loop; |
346 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber( | 347 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber( |
347 new FakeFrameSubscriber(base::Bind( | 348 new FakeFrameSubscriber(base::Bind( |
348 &RenderWidgetHostViewBrowserTest::FrameDelivered, | 349 &RenderWidgetHostViewBrowserTest::FrameDelivered, |
349 base::Unretained(this), base::ThreadTaskRunnerHandle::Get(), | 350 base::Unretained(this), base::ThreadTaskRunnerHandle::Get(), |
350 run_loop.QuitClosure()))); | 351 run_loop.QuitClosure()))); |
351 view->BeginFrameSubscription(subscriber.Pass()); | 352 view->BeginFrameSubscription(std::move(subscriber)); |
352 run_loop.Run(); | 353 run_loop.Run(); |
353 view->EndFrameSubscription(); | 354 view->EndFrameSubscription(); |
354 | 355 |
355 EXPECT_LE(1, callback_invoke_count()); | 356 EXPECT_LE(1, callback_invoke_count()); |
356 EXPECT_LE(1, frames_captured()); | 357 EXPECT_LE(1, frames_captured()); |
357 } | 358 } |
358 | 359 |
359 IN_PROC_BROWSER_TEST_P(CompositingRenderWidgetHostViewBrowserTest, CopyTwice) { | 360 IN_PROC_BROWSER_TEST_P(CompositingRenderWidgetHostViewBrowserTest, CopyTwice) { |
360 SET_UP_SURFACE_OR_PASS_TEST(NULL); | 361 SET_UP_SURFACE_OR_PASS_TEST(NULL); |
361 RenderWidgetHostViewBase* const view = GetRenderWidgetHostView(); | 362 RenderWidgetHostViewBase* const view = GetRenderWidgetHostView(); |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 kTestCompositingModes); | 1002 kTestCompositingModes); |
1002 INSTANTIATE_TEST_CASE_P( | 1003 INSTANTIATE_TEST_CASE_P( |
1003 GLAndSoftwareCompositing, | 1004 GLAndSoftwareCompositing, |
1004 CompositingRenderWidgetHostViewBrowserTestTabCaptureHighDPI, | 1005 CompositingRenderWidgetHostViewBrowserTestTabCaptureHighDPI, |
1005 kTestCompositingModes); | 1006 kTestCompositingModes); |
1006 | 1007 |
1007 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 1008 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
1008 | 1009 |
1009 } // namespace | 1010 } // namespace |
1010 } // namespace content | 1011 } // namespace content |
OLD | NEW |