OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 std::unique_ptr<DesktopFrame> frame; | 269 std::unique_ptr<DesktopFrame> frame; |
270 EXPECT_CALL(callback_, | 270 EXPECT_CALL(callback_, |
271 OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS, _)) | 271 OnCaptureResultPtr(DesktopCapturer::Result::SUCCESS, _)) |
272 .WillOnce(SaveUniquePtrArg(&frame)); | 272 .WillOnce(SaveUniquePtrArg(&frame)); |
273 capturer->CaptureFrame(); | 273 capturer->CaptureFrame(); |
274 EXPECT_TRUE(frame); | 274 EXPECT_TRUE(frame); |
275 return frame; | 275 return frame; |
276 } | 276 } |
277 }; | 277 }; |
278 | 278 |
279 TEST_F(ScreenCapturerIntegrationTest, CaptureUpdatedRegion) { | 279 #if defined(WEBRTC_WIN) |
| 280 #define MAYBE_CaptureUpdatedRegion DISABLED_CaptureUpdatedRegion |
| 281 #else |
| 282 #define MAYBE_CaptureUpdatedRegion CaptureUpdatedRegion |
| 283 #endif |
| 284 TEST_F(ScreenCapturerIntegrationTest, MAYBE_CaptureUpdatedRegion) { |
280 TestCaptureUpdatedRegion(); | 285 TestCaptureUpdatedRegion(); |
281 } | 286 } |
282 | 287 |
283 TEST_F(ScreenCapturerIntegrationTest, TwoCapturers) { | 288 #if defined(WEBRTC_WIN) |
| 289 #define MAYBE_TwoCapturers DISABLED_TwoCapturers |
| 290 #else |
| 291 #define MAYBE_TwoCapturers TwoCapturers |
| 292 #endif |
| 293 TEST_F(ScreenCapturerIntegrationTest, MAYBE_TwoCapturers) { |
284 std::unique_ptr<DesktopCapturer> capturer2 = std::move(capturer_); | 294 std::unique_ptr<DesktopCapturer> capturer2 = std::move(capturer_); |
285 SetUp(); | 295 SetUp(); |
286 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 296 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
287 } | 297 } |
288 | 298 |
289 #if defined(WEBRTC_WIN) | 299 #if defined(WEBRTC_WIN) |
290 | 300 |
291 TEST_F(ScreenCapturerIntegrationTest, | 301 TEST_F(ScreenCapturerIntegrationTest, |
292 CaptureUpdatedRegionWithDirectxCapturer) { | 302 DISABLED_CaptureUpdatedRegionWithDirectxCapturer) { |
293 if (!CreateDirectxCapturer()) { | 303 if (!CreateDirectxCapturer()) { |
294 return; | 304 return; |
295 } | 305 } |
296 | 306 |
297 TestCaptureUpdatedRegion(); | 307 TestCaptureUpdatedRegion(); |
298 } | 308 } |
299 | 309 |
300 TEST_F(ScreenCapturerIntegrationTest, TwoDirectxCapturers) { | 310 TEST_F(ScreenCapturerIntegrationTest, DISABLED_TwoDirectxCapturers) { |
301 if (!CreateDirectxCapturer()) { | 311 if (!CreateDirectxCapturer()) { |
302 return; | 312 return; |
303 } | 313 } |
304 | 314 |
305 std::unique_ptr<DesktopCapturer> capturer2 = std::move(capturer_); | 315 std::unique_ptr<DesktopCapturer> capturer2 = std::move(capturer_); |
306 RTC_CHECK(CreateDirectxCapturer()); | 316 RTC_CHECK(CreateDirectxCapturer()); |
307 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 317 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
308 } | 318 } |
309 | 319 |
310 TEST_F(ScreenCapturerIntegrationTest, | 320 TEST_F(ScreenCapturerIntegrationTest, |
311 CaptureUpdatedRegionWithMagnifierCapturer) { | 321 DISABLED_CaptureUpdatedRegionWithMagnifierCapturer) { |
312 // On Windows 8 or later, magnifier APIs return a frame with a border on test | 322 // On Windows 8 or later, magnifier APIs return a frame with a border on test |
313 // environment, so disable these tests. | 323 // environment, so disable these tests. |
314 // Bug https://bugs.chromium.org/p/webrtc/issues/detail?id=6666 | 324 // Bug https://bugs.chromium.org/p/webrtc/issues/detail?id=6666 |
315 // TODO(zijiehe): Find the root cause of the border and failure, which cannot | 325 // TODO(zijiehe): Find the root cause of the border and failure, which cannot |
316 // reproduce on my dev machine. | 326 // reproduce on my dev machine. |
317 if (rtc::IsWindows8OrLater()) { | 327 if (rtc::IsWindows8OrLater()) { |
318 return; | 328 return; |
319 } | 329 } |
320 CreateMagnifierCapturer(); | 330 CreateMagnifierCapturer(); |
321 TestCaptureUpdatedRegion(); | 331 TestCaptureUpdatedRegion(); |
322 } | 332 } |
323 | 333 |
324 TEST_F(ScreenCapturerIntegrationTest, TwoMagnifierCapturers) { | 334 TEST_F(ScreenCapturerIntegrationTest, DISABLED_TwoMagnifierCapturers) { |
325 // On Windows 8 or later, magnifier APIs return a frame with a border on test | 335 // On Windows 8 or later, magnifier APIs return a frame with a border on test |
326 // environment, so disable these tests. | 336 // environment, so disable these tests. |
327 // Bug https://bugs.chromium.org/p/webrtc/issues/detail?id=6666 | 337 // Bug https://bugs.chromium.org/p/webrtc/issues/detail?id=6666 |
328 // TODO(zijiehe): Find the root cause of the border and failure, which cannot | 338 // TODO(zijiehe): Find the root cause of the border and failure, which cannot |
329 // reproduce on my dev machine. | 339 // reproduce on my dev machine. |
330 if (rtc::IsWindows8OrLater()) { | 340 if (rtc::IsWindows8OrLater()) { |
331 return; | 341 return; |
332 } | 342 } |
333 CreateMagnifierCapturer(); | 343 CreateMagnifierCapturer(); |
334 std::unique_ptr<DesktopCapturer> capturer2 = std::move(capturer_); | 344 std::unique_ptr<DesktopCapturer> capturer2 = std::move(capturer_); |
335 CreateMagnifierCapturer(); | 345 CreateMagnifierCapturer(); |
336 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); | 346 TestCaptureUpdatedRegion({capturer_.get(), capturer2.get()}); |
337 } | 347 } |
338 | 348 |
339 TEST_F(ScreenCapturerIntegrationTest, | 349 TEST_F(ScreenCapturerIntegrationTest, |
340 MaybeCaptureUpdatedRegionWithDirectxCapturer) { | 350 DISABLED_MaybeCaptureUpdatedRegionWithDirectxCapturer) { |
341 // Even DirectX capturer is not supported in current system, we should be able | 351 // Even DirectX capturer is not supported in current system, we should be able |
342 // to select a usable capturer. | 352 // to select a usable capturer. |
343 MaybeCreateDirectxCapturer(); | 353 MaybeCreateDirectxCapturer(); |
344 TestCaptureUpdatedRegion(); | 354 TestCaptureUpdatedRegion(); |
345 } | 355 } |
346 | 356 |
347 #endif // defined(WEBRTC_WIN) | 357 #endif // defined(WEBRTC_WIN) |
348 | 358 |
349 } // namespace webrtc | 359 } // namespace webrtc |
OLD | NEW |