| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 .WillOnce(SaveUniquePtrArg(&frame)); | 121 .WillOnce(SaveUniquePtrArg(&frame)); |
| 122 | 122 |
| 123 capturer_->Start(&callback_); | 123 capturer_->Start(&callback_); |
| 124 capturer_->CaptureFrame(); | 124 capturer_->CaptureFrame(); |
| 125 | 125 |
| 126 ASSERT_TRUE(frame); | 126 ASSERT_TRUE(frame); |
| 127 EXPECT_GT(frame->size().width(), 0); | 127 EXPECT_GT(frame->size().width(), 0); |
| 128 EXPECT_GT(frame->size().height(), 0); | 128 EXPECT_GT(frame->size().height(), 0); |
| 129 EXPECT_GE(frame->stride(), | 129 EXPECT_GE(frame->stride(), |
| 130 frame->size().width() * DesktopFrame::kBytesPerPixel); | 130 frame->size().width() * DesktopFrame::kBytesPerPixel); |
| 131 EXPECT_TRUE(frame->shared_memory() == NULL); | 131 EXPECT_TRUE(frame->shared_memory() == nullptr); |
| 132 | 132 |
| 133 // Verify that the region contains whole screen. | 133 // Verify that the region contains whole screen. |
| 134 EXPECT_FALSE(frame->updated_region().is_empty()); | 134 EXPECT_FALSE(frame->updated_region().is_empty()); |
| 135 DesktopRegion::Iterator it(frame->updated_region()); | 135 DesktopRegion::Iterator it(frame->updated_region()); |
| 136 ASSERT_TRUE(!it.IsAtEnd()); | 136 ASSERT_TRUE(!it.IsAtEnd()); |
| 137 EXPECT_TRUE(it.rect().equals(DesktopRect::MakeSize(frame->size()))); | 137 EXPECT_TRUE(it.rect().equals(DesktopRect::MakeSize(frame->size()))); |
| 138 it.Advance(); | 138 it.Advance(); |
| 139 EXPECT_TRUE(it.IsAtEnd()); | 139 EXPECT_TRUE(it.IsAtEnd()); |
| 140 } | 140 } |
| 141 | 141 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 std::unique_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory())); | 199 std::unique_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory())); |
| 200 capturer_->CaptureFrame(); | 200 capturer_->CaptureFrame(); |
| 201 ASSERT_TRUE(frame); | 201 ASSERT_TRUE(frame); |
| 202 ASSERT_TRUE(frame->shared_memory()); | 202 ASSERT_TRUE(frame->shared_memory()); |
| 203 EXPECT_EQ(frame->shared_memory()->id(), kTestSharedMemoryId); | 203 EXPECT_EQ(frame->shared_memory()->id(), kTestSharedMemoryId); |
| 204 } | 204 } |
| 205 | 205 |
| 206 #endif // defined(WEBRTC_WIN) | 206 #endif // defined(WEBRTC_WIN) |
| 207 | 207 |
| 208 } // namespace webrtc | 208 } // namespace webrtc |
| OLD | NEW |