Use test::RunLoop in sdk/objc/unittests/main.mm Bug: webrtc:469327588 Change-Id: I5131415506cbe626f30839a9758a50d36a6a6964 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/465241 Reviewed-by: Anders Lilienthal <andersc@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@webrtc.org> Auto-Submit: Evan Shrubsole <eshr@webrtc.org> Commit-Queue: Anders Lilienthal <andersc@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47480}
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 66b83d0..1a7fd8e 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn
@@ -1296,6 +1296,7 @@ ":sdk_unittests_bundle_data", ":sdk_unittests_sources", "../rtc_base:threading", + "../test:run_loop", "//test:test_support_objc", ] ldflags = [ "-all_load" ] @@ -1315,6 +1316,7 @@ ":framework_objc+link", ":ios_framework_bundle", "../rtc_base:threading", + "../test:run_loop", "//test:test_support_objc", ] }
diff --git a/sdk/objc/unittests/main.mm b/sdk/objc/unittests/main.mm index 4415f64..bf8f7f1 100644 --- a/sdk/objc/unittests/main.mm +++ b/sdk/objc/unittests/main.mm
@@ -12,11 +12,12 @@ #import <UIKit/UIKit.h> #include "rtc_base/thread.h" #include "test/ios/coverage_util_ios.h" +#include "test/run_loop.h" int main(int argc, char* argv[]) { webrtc::test::ConfigureCoverageReportPath(); - webrtc::AutoThread main_thread; + webrtc::test::RunLoop main_thread; @autoreleasepool { return UIApplicationMain(argc, argv, nil, nil);