| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |