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

Side by Side Diff: content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "content/child/child_process.h" 9 #include "content/child/child_process.h"
10 #include "content/renderer/media/media_stream_video_capturer_source.h" 10 #include "content/renderer/media/media_stream_video_capturer_source.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 class CanvasCaptureHandlerTest 48 class CanvasCaptureHandlerTest
49 : public TestWithParam<testing::tuple<bool, int, int>> { 49 : public TestWithParam<testing::tuple<bool, int, int>> {
50 public: 50 public:
51 CanvasCaptureHandlerTest() {} 51 CanvasCaptureHandlerTest() {}
52 52
53 void SetUp() override { 53 void SetUp() override {
54 canvas_capture_handler_.reset( 54 canvas_capture_handler_ = CanvasCaptureHandler::CreateCanvasCaptureHandler(
55 CanvasCaptureHandler::CreateCanvasCaptureHandler( 55 blink::WebSize(kTestCanvasCaptureWidth, kTestCanvasCaptureHeight),
56 blink::WebSize(kTestCanvasCaptureWidth, kTestCanvasCaptureHeight), 56 kTestCanvasCaptureFramesPerSecond, message_loop_.task_runner(),
57 kTestCanvasCaptureFramesPerSecond, message_loop_.task_runner(), 57 &track_);
58 &track_));
59 } 58 }
60 59
61 void TearDown() override { 60 void TearDown() override {
62 track_.Reset(); 61 track_.Reset();
63 blink::WebHeap::CollectAllGarbageForTesting(); 62 blink::WebHeap::CollectAllGarbageForTesting();
64 canvas_capture_handler_.reset(); 63 canvas_capture_handler_.reset();
65 64
66 // Let the message loop run to finish destroying the capturer. 65 // Let the message loop run to finish destroying the capturer.
67 base::RunLoop().RunUntilIdle(); 66 base::RunLoop().RunUntilIdle();
68 } 67 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 INSTANTIATE_TEST_CASE_P( 248 INSTANTIATE_TEST_CASE_P(
250 , 249 ,
251 CanvasCaptureHandlerTest, 250 CanvasCaptureHandlerTest,
252 ::testing::Combine(::testing::Bool(), 251 ::testing::Combine(::testing::Bool(),
253 ::testing::Values(kTestCanvasCaptureFrameEvenSize, 252 ::testing::Values(kTestCanvasCaptureFrameEvenSize,
254 kTestCanvasCaptureFrameOddSize), 253 kTestCanvasCaptureFrameOddSize),
255 ::testing::Values(kTestCanvasCaptureFrameEvenSize, 254 ::testing::Values(kTestCanvasCaptureFrameEvenSize,
256 kTestCanvasCaptureFrameOddSize))); 255 kTestCanvasCaptureFrameOddSize)));
257 256
258 } // namespace content 257 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media_capture_from_element/canvas_capture_handler.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698