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

Unified Diff: media/midi/midi_manager_unittest.cc

Issue 1315793008: Web MIDI: introduce MidiManager::Shutdown to shutdown gracefully (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make sure to run Finalize() Created 5 years, 3 months 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
Index: media/midi/midi_manager_unittest.cc
diff --git a/media/midi/midi_manager_unittest.cc b/media/midi/midi_manager_unittest.cc
index 2b56780e22e793fea044a223692ba74ad13b23f0..0ad5c809c302027a07b8710fa53a58a8e8ff56ec 100644
--- a/media/midi/midi_manager_unittest.cc
+++ b/media/midi/midi_manager_unittest.cc
@@ -100,7 +100,11 @@ class MidiManagerTest : public ::testing::Test {
MidiManagerTest()
: manager_(new FakeMidiManager),
message_loop_(new base::MessageLoop) {}
- ~MidiManagerTest() override {}
+ ~MidiManagerTest() override {
+ manager_->Shutdown();
+ base::RunLoop run_loop;
+ run_loop.RunUntilIdle();
+ }
protected:
void StartTheFirstSession(FakeMidiManagerClient* client) {
@@ -267,6 +271,10 @@ TEST_F(MidiManagerTest, CreateMidiManager) {
#else
EXPECT_EQ(Result::OK, result);
#endif
+
+ manager->Shutdown();
+ base::RunLoop run_loop;
+ run_loop.RunUntilIdle();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698