Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: content/browser/renderer_host/media/media_stream_manager_unittest.cc

Issue 1483533003: Fix teardown of a couple of test suites Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New runloop Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
index cdf857a8f7ccb7bca8bee89b025270823eceea0f..9450daa742b2a4ad912dba58a1ccf9e952b4d927 100644
--- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -170,7 +170,13 @@ class MediaStreamManagerTest : public ::testing::Test {
media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
}
- virtual ~MediaStreamManagerTest() {
+ ~MediaStreamManagerTest() override {
+ // Since the main thread of this test suite is the IO thread,
+ // we need to flush it to clear any pending operations before
+ // deleting the MSM.
+ base::RunLoop loop;
+ loop.RunUntilIdle();
+ media_stream_manager_->WillDestroyCurrentMessageLoop();
}
MOCK_METHOD1(Response, void(int index));
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698