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

Side by Side Diff: content/browser/renderer_host/media/desktop_capture_device_unittest.cc

Issue 24649002: Clean up a few more unused globals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thestig comment Created 7 years, 2 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
OLDNEW
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 "content/browser/renderer_host/media/desktop_capture_device.h" 5 #include "content/browser/renderer_host/media/desktop_capture_device.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/sequenced_task_runner.h" 8 #include "base/sequenced_task_runner.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 17 matching lines...) Expand all
28 namespace { 28 namespace {
29 29
30 MATCHER_P2(EqualsCaptureCapability, width, height, "") { 30 MATCHER_P2(EqualsCaptureCapability, width, height, "") {
31 return arg.width == width && arg.height == height; 31 return arg.width == width && arg.height == height;
32 } 32 }
33 33
34 const int kTestFrameWidth1 = 100; 34 const int kTestFrameWidth1 = 100;
35 const int kTestFrameHeight1 = 100; 35 const int kTestFrameHeight1 = 100;
36 const int kTestFrameWidth2 = 200; 36 const int kTestFrameWidth2 = 200;
37 const int kTestFrameHeight2 = 150; 37 const int kTestFrameHeight2 = 150;
38 const int kBufferSize = kTestFrameWidth2 * kTestFrameHeight2 * 4;
39 38
40 const int kFrameRate = 30; 39 const int kFrameRate = 30;
41 40
42 class MockFrameObserver : public media::VideoCaptureDevice::EventHandler { 41 class MockFrameObserver : public media::VideoCaptureDevice::EventHandler {
43 public: 42 public:
44 MOCK_METHOD0(ReserveOutputBuffer, scoped_refptr<media::VideoFrame>()); 43 MOCK_METHOD0(ReserveOutputBuffer, scoped_refptr<media::VideoFrame>());
45 MOCK_METHOD0(OnError, void()); 44 MOCK_METHOD0(OnError, void());
46 MOCK_METHOD1(OnFrameInfo, void(const media::VideoCaptureCapability& info)); 45 MOCK_METHOD1(OnFrameInfo, void(const media::VideoCaptureCapability& info));
47 MOCK_METHOD1(OnFrameInfoChanged, 46 MOCK_METHOD1(OnFrameInfoChanged,
48 void(const media::VideoCaptureCapability& info)); 47 void(const media::VideoCaptureCapability& info));
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 capture_device.DeAllocate(); 261 capture_device.DeAllocate();
263 262
264 EXPECT_EQ(kTestFrameWidth1, caps.width); 263 EXPECT_EQ(kTestFrameWidth1, caps.width);
265 EXPECT_EQ(kTestFrameHeight1, caps.height); 264 EXPECT_EQ(kTestFrameHeight1, caps.height);
266 EXPECT_EQ(kFrameRate, caps.frame_rate); 265 EXPECT_EQ(kFrameRate, caps.frame_rate);
267 EXPECT_EQ(media::PIXEL_FORMAT_ARGB, caps.color); 266 EXPECT_EQ(media::PIXEL_FORMAT_ARGB, caps.color);
268 EXPECT_FALSE(caps.interlaced); 267 EXPECT_FALSE(caps.interlaced);
269 } 268 }
270 269
271 } // namespace content 270 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698