| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 264 |
| 265 // Verify that the region contains whole screen. | 265 // Verify that the region contains whole screen. |
| 266 EXPECT_FALSE(frame->updated_region().is_empty()); | 266 EXPECT_FALSE(frame->updated_region().is_empty()); |
| 267 DesktopRegion::Iterator it(frame->updated_region()); | 267 DesktopRegion::Iterator it(frame->updated_region()); |
| 268 ASSERT_TRUE(!it.IsAtEnd()); | 268 ASSERT_TRUE(!it.IsAtEnd()); |
| 269 EXPECT_TRUE(it.rect().equals(DesktopRect::MakeSize(frame->size()))); | 269 EXPECT_TRUE(it.rect().equals(DesktopRect::MakeSize(frame->size()))); |
| 270 it.Advance(); | 270 it.Advance(); |
| 271 EXPECT_TRUE(it.IsAtEnd()); | 271 EXPECT_TRUE(it.IsAtEnd()); |
| 272 } | 272 } |
| 273 | 273 |
| 274 TEST_F(ScreenCapturerTest, CaptureUpdatedRegion) { | 274 // Disabled due to being flaky due to the fact that it useds rendering / UI, |
| 275 // see webrtc/6366. |
| 276 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegion) { |
| 275 TestCaptureUpdatedRegion(); | 277 TestCaptureUpdatedRegion(); |
| 276 } | 278 } |
| 277 | 279 |
| 280 // Disabled due to being flaky due to the fact that it useds rendering / UI, |
| 281 // see webrtc/6366. |
| 278 // TODO(zijiehe): Find out the reason of failure of this test on trybot. | 282 // TODO(zijiehe): Find out the reason of failure of this test on trybot. |
| 279 TEST_F(ScreenCapturerTest, DISABLED_TwoCapturers) { | 283 TEST_F(ScreenCapturerTest, DISABLED_TwoCapturers) { |
| 280 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); | 284 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); |
| 281 SetUp(); | 285 SetUp(); |
| 282 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 286 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
| 283 } | 287 } |
| 284 | 288 |
| 285 #if defined(WEBRTC_WIN) | 289 #if defined(WEBRTC_WIN) |
| 286 | 290 |
| 287 TEST_F(ScreenCapturerTest, UseSharedBuffers) { | 291 TEST_F(ScreenCapturerTest, UseSharedBuffers) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 344 |
| 341 capturer_->Start(&callback_); | 345 capturer_->Start(&callback_); |
| 342 capturer_->SetSharedMemoryFactory( | 346 capturer_->SetSharedMemoryFactory( |
| 343 std::unique_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory())); | 347 std::unique_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory())); |
| 344 capturer_->Capture(DesktopRegion()); | 348 capturer_->Capture(DesktopRegion()); |
| 345 ASSERT_TRUE(frame); | 349 ASSERT_TRUE(frame); |
| 346 ASSERT_TRUE(frame->shared_memory()); | 350 ASSERT_TRUE(frame->shared_memory()); |
| 347 EXPECT_EQ(frame->shared_memory()->id(), kTestSharedMemoryId); | 351 EXPECT_EQ(frame->shared_memory()->id(), kTestSharedMemoryId); |
| 348 } | 352 } |
| 349 | 353 |
| 350 TEST_F(ScreenCapturerTest, CaptureUpdatedRegionWithDirectxCapturer) { | 354 // Disabled due to being flaky due to the fact that it useds rendering / UI, |
| 355 // see webrtc/6366. |
| 356 TEST_F(ScreenCapturerTest, DISABLED_CaptureUpdatedRegionWithDirectxCapturer) { |
| 351 if (!CreateDirectxCapturer()) { | 357 if (!CreateDirectxCapturer()) { |
| 352 return; | 358 return; |
| 353 } | 359 } |
| 354 | 360 |
| 355 TestCaptureUpdatedRegion(); | 361 TestCaptureUpdatedRegion(); |
| 356 } | 362 } |
| 357 | 363 |
| 358 TEST_F(ScreenCapturerTest, TwoDirectxCapturers) { | 364 // Disabled due to being flaky due to the fact that it useds rendering / UI, |
| 365 // see webrtc/6366. |
| 366 TEST_F(ScreenCapturerTest, DISABLED_TwoDirectxCapturers) { |
| 359 if (!CreateDirectxCapturer()) { | 367 if (!CreateDirectxCapturer()) { |
| 360 return; | 368 return; |
| 361 } | 369 } |
| 362 | 370 |
| 363 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); | 371 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); |
| 364 RTC_CHECK(CreateDirectxCapturer()); | 372 RTC_CHECK(CreateDirectxCapturer()); |
| 365 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 373 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
| 366 } | 374 } |
| 367 | 375 |
| 368 TEST_F(ScreenCapturerTest, TwoMagnifierCapturers) { | 376 // Disabled due to being flaky due to the fact that it useds rendering / UI, |
| 377 // see webrtc/6366. |
| 378 TEST_F(ScreenCapturerTest, DISABLED_TwoMagnifierCapturers) { |
| 369 CreateMagnifierCapturer(); | 379 CreateMagnifierCapturer(); |
| 370 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); | 380 std::unique_ptr<ScreenCapturer> capturer2 = std::move(capturer_); |
| 371 CreateMagnifierCapturer(); | 381 CreateMagnifierCapturer(); |
| 372 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 382 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
| 373 } | 383 } |
| 374 | 384 |
| 375 #endif // defined(WEBRTC_WIN) | 385 #endif // defined(WEBRTC_WIN) |
| 376 | 386 |
| 377 } // namespace webrtc | 387 } // namespace webrtc |
| OLD | NEW |