diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/modules/video_capture/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libwebrtc/modules/video_capture/test/video_capture_unittest.cc | 21 |
2 files changed, 2 insertions, 20 deletions
diff --git a/third_party/libwebrtc/modules/video_capture/BUILD.gn b/third_party/libwebrtc/modules/video_capture/BUILD.gn index 45a0272eee..3132e452ba 100644 --- a/third_party/libwebrtc/modules/video_capture/BUILD.gn +++ b/third_party/libwebrtc/modules/video_capture/BUILD.gn @@ -173,6 +173,7 @@ if (!build_with_chromium || is_linux || is_chromeos) { "../../api/video:video_frame", "../../api/video:video_rtp_headers", "../../common_video", + "../../rtc_base:gunit_helpers", "../../rtc_base:timeutils", "../../rtc_base/synchronization:mutex", "../../system_wrappers", diff --git a/third_party/libwebrtc/modules/video_capture/test/video_capture_unittest.cc b/third_party/libwebrtc/modules/video_capture/test/video_capture_unittest.cc index c8af222b57..dec8de70cb 100644 --- a/third_party/libwebrtc/modules/video_capture/test/video_capture_unittest.cc +++ b/third_party/libwebrtc/modules/video_capture/test/video_capture_unittest.cc @@ -22,35 +22,16 @@ #include "api/video/video_frame.h" #include "common_video/libyuv/include/webrtc_libyuv.h" #include "modules/video_capture/video_capture_factory.h" +#include "rtc_base/gunit.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/time_utils.h" -#include "system_wrappers/include/sleep.h" #include "test/frame_utils.h" #include "test/gtest.h" -using webrtc::SleepMs; using webrtc::VideoCaptureCapability; using webrtc::VideoCaptureFactory; using webrtc::VideoCaptureModule; -#define WAIT_(ex, timeout, res) \ - do { \ - res = (ex); \ - int64_t start = rtc::TimeMillis(); \ - while (!res && rtc::TimeMillis() < start + timeout) { \ - SleepMs(5); \ - res = (ex); \ - } \ - } while (0) - -#define EXPECT_TRUE_WAIT(ex, timeout) \ - do { \ - bool res; \ - WAIT_(ex, timeout, res); \ - if (!res) \ - EXPECT_TRUE(ex); \ - } while (0) - static const int kTimeOut = 5000; #ifdef WEBRTC_MAC static const int kTestHeight = 288; |