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

Side by Side Diff: webrtc/modules/desktop_capture/screen_capturer_mac_unittest.cc

Issue 1678073003: Cleanup shared memory handling in DesktopCapturer interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 EXPECT_EQ(static_cast<int>(sizeof(uint32_t) * width), 73 EXPECT_EQ(static_cast<int>(sizeof(uint32_t) * width),
74 abs(frame->stride())); 74 abs(frame->stride()));
75 } 75 }
76 76
77 TEST_F(ScreenCapturerMacTest, Capture) { 77 TEST_F(ScreenCapturerMacTest, Capture) {
78 EXPECT_CALL(callback_, OnCaptureCompleted(_)) 78 EXPECT_CALL(callback_, OnCaptureCompleted(_))
79 .Times(2) 79 .Times(2)
80 .WillOnce(Invoke(this, &ScreenCapturerMacTest::CaptureDoneCallback1)) 80 .WillOnce(Invoke(this, &ScreenCapturerMacTest::CaptureDoneCallback1))
81 .WillOnce(Invoke(this, &ScreenCapturerMacTest::CaptureDoneCallback2)); 81 .WillOnce(Invoke(this, &ScreenCapturerMacTest::CaptureDoneCallback2));
82 82
83 EXPECT_CALL(callback_, CreateSharedMemory(_))
84 .Times(AnyNumber())
85 .WillRepeatedly(Return(static_cast<SharedMemory*>(NULL)));
86
87 SCOPED_TRACE(""); 83 SCOPED_TRACE("");
88 capturer_->Start(&callback_); 84 capturer_->Start(&callback_);
89 85
90 // Check that we get an initial full-screen updated. 86 // Check that we get an initial full-screen updated.
91 capturer_->Capture(DesktopRegion()); 87 capturer_->Capture(DesktopRegion());
92 88
93 // Check that subsequent dirty rects are propagated correctly. 89 // Check that subsequent dirty rects are propagated correctly.
94 capturer_->Capture(DesktopRegion()); 90 capturer_->Capture(DesktopRegion());
95 } 91 }
96 92
97 } // namespace webrtc 93 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame_win.cc ('k') | webrtc/modules/desktop_capture/screen_capturer_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698