| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 // Verify that the region contains whole screen. | 271 // Verify that the region contains whole screen. |
| 272 EXPECT_FALSE(frame->updated_region().is_empty()); | 272 EXPECT_FALSE(frame->updated_region().is_empty()); |
| 273 DesktopRegion::Iterator it(frame->updated_region()); | 273 DesktopRegion::Iterator it(frame->updated_region()); |
| 274 ASSERT_TRUE(!it.IsAtEnd()); | 274 ASSERT_TRUE(!it.IsAtEnd()); |
| 275 EXPECT_TRUE(it.rect().equals(DesktopRect::MakeSize(frame->size()))); | 275 EXPECT_TRUE(it.rect().equals(DesktopRect::MakeSize(frame->size()))); |
| 276 it.Advance(); | 276 it.Advance(); |
| 277 EXPECT_TRUE(it.IsAtEnd()); | 277 EXPECT_TRUE(it.IsAtEnd()); |
| 278 } | 278 } |
| 279 | 279 |
| 280 // Disabled due to being flaky due to the fact that it useds rendering / UI, | 280 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 281 // see webrtc/6366. | 281 // webrtc/6366. |
| 282 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegion) { | 282 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegion) { |
| 283 TestCaptureUpdatedRegion(); | 283 TestCaptureUpdatedRegion(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 // Disabled due to being flaky due to the fact that it useds rendering / UI, | 286 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 287 // see webrtc/6366. | 287 // webrtc/6366. |
| 288 // TODO(zijiehe): Find out the reason of failure of this test on trybot. | |
| 289 TEST_F(ScreenCapturerTest, DISABLED_TwoCapturers) { | 288 TEST_F(ScreenCapturerTest, DISABLED_TwoCapturers) { |
| 290 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); | 289 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); |
| 291 SetUp(); | 290 SetUp(); |
| 292 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 291 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
| 293 } | 292 } |
| 294 | 293 |
| 295 #if defined(WEBRTC_WIN) | 294 #if defined(WEBRTC_WIN) |
| 296 | 295 |
| 297 TEST_F(ScreenCapturerTest, UseSharedBuffers) { | 296 TEST_F(ScreenCapturerTest, UseSharedBuffers) { |
| 298 std::unique_ptr<DesktopFrame> frame; | 297 std::unique_ptr<DesktopFrame> frame; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 349 |
| 351 capturer_->Start(&callback_); | 350 capturer_->Start(&callback_); |
| 352 capturer_->SetSharedMemoryFactory( | 351 capturer_->SetSharedMemoryFactory( |
| 353 std::unique_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory())); | 352 std::unique_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory())); |
| 354 capturer_->Capture(DesktopRegion()); | 353 capturer_->Capture(DesktopRegion()); |
| 355 ASSERT_TRUE(frame); | 354 ASSERT_TRUE(frame); |
| 356 ASSERT_TRUE(frame->shared_memory()); | 355 ASSERT_TRUE(frame->shared_memory()); |
| 357 EXPECT_EQ(frame->shared_memory()->id(), kTestSharedMemoryId); | 356 EXPECT_EQ(frame->shared_memory()->id(), kTestSharedMemoryId); |
| 358 } | 357 } |
| 359 | 358 |
| 360 // Disabled due to being flaky due to the fact that it useds rendering / UI, | 359 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 361 // see webrtc/6366. | 360 // webrtc/6366. |
| 362 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegionWithDirectxCapturer) { | 361 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegionWithDirectxCapturer) { |
| 363 if (!CreateDirectxCapturer()) { | 362 if (!CreateDirectxCapturer()) { |
| 364 return; | 363 return; |
| 365 } | 364 } |
| 366 | 365 |
| 367 TestCaptureUpdatedRegion(); | 366 TestCaptureUpdatedRegion(); |
| 368 } | 367 } |
| 369 | 368 |
| 370 // Disabled due to being flaky due to the fact that it useds rendering / UI, | 369 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 371 // see webrtc/6366. | 370 // webrtc/6366. |
| 372 TEST_F(ScreenCapturerTest, DISABLED_TwoDirectxCapturers) { | 371 TEST_F(ScreenCapturerTest, DISABLED_TwoDirectxCapturers) { |
| 373 if (!CreateDirectxCapturer()) { | 372 if (!CreateDirectxCapturer()) { |
| 374 return; | 373 return; |
| 375 } | 374 } |
| 376 | 375 |
| 377 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); | 376 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); |
| 378 RTC_CHECK(CreateDirectxCapturer()); | 377 RTC_CHECK(CreateDirectxCapturer()); |
| 379 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 378 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
| 380 } | 379 } |
| 381 | 380 |
| 382 // Disabled due to being flaky due to the fact that it useds rendering / UI, | 381 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 383 // see webrtc/6366. | 382 // webrtc/6366. |
| 383 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegionWithMagnifierCapturer) { |
| 384 CreateMagnifierCapturer(); |
| 385 TestCaptureUpdatedRegion(); |
| 386 } |
| 387 |
| 388 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 389 // webrtc/6366. |
| 384 TEST_F(ScreenCapturerTest, DISABLED_TwoMagnifierCapturers) { | 390 TEST_F(ScreenCapturerTest, DISABLED_TwoMagnifierCapturers) { |
| 385 CreateMagnifierCapturer(); | 391 CreateMagnifierCapturer(); |
| 386 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); | 392 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); |
| 387 CreateMagnifierCapturer(); | 393 CreateMagnifierCapturer(); |
| 388 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 394 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
| 389 } | 395 } |
| 390 | 396 |
| 391 // Disabled due to being flaky due to the fact that it useds rendering / UI, | 397 // Disabled due to being flaky due to the fact that it uses rendering / UI, see |
| 392 // see webrtc/6366. | 398 // webrtc/6366. |
| 393 TEST_F(ScreenCapturerTest, | 399 TEST_F(ScreenCapturerTest, |
| 394 DISABLED_MaybeCaptureUpdatedRegionWithDirectxCapturer) { | 400 DISABLED_MaybeCaptureUpdatedRegionWithDirectxCapturer) { |
| 395 // Even DirectX capturer is not supported in current system, we should be able | 401 // Even DirectX capturer is not supported in current system, we should be able |
| 396 // to select a usable capturer. | 402 // to select a usable capturer. |
| 397 MaybeCreateDirectxCapturer(); | 403 MaybeCreateDirectxCapturer(); |
| 398 TestCaptureUpdatedRegion(); | 404 TestCaptureUpdatedRegion(); |
| 399 } | 405 } |
| 400 | 406 |
| 401 #endif // defined(WEBRTC_WIN) | 407 #endif // defined(WEBRTC_WIN) |
| 402 | 408 |
| 403 } // namespace webrtc | 409 } // namespace webrtc |
| OLD | NEW |