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

Unified Diff: media/midi/midi_manager_mac_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: rename to Detach Created 5 years, 2 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
« no previous file with comments | « media/midi/midi_manager.cc ('k') | media/midi/midi_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_mac_unittest.cc
diff --git a/media/midi/midi_manager_mac_unittest.cc b/media/midi/midi_manager_mac_unittest.cc
index 83a24c02615fd3a5348847cb9c5a2d329595c414..244576ef53b4493974efb6d01d681ee4696aede4 100644
--- a/media/midi/midi_manager_mac_unittest.cc
+++ b/media/midi/midi_manager_mac_unittest.cc
@@ -61,6 +61,7 @@ class FakeMidiManagerClient : public MidiManagerClient {
void ReceiveMidiData(uint32 port_index, const uint8* data, size_t size,
double timestamp) override {}
void AccumulateMidiBytesSent(size_t size) override {}
+ void Detach() override {}
bool GetWaitForResult() {
base::AutoLock lock(lock_);
@@ -105,6 +106,11 @@ class MidiManagerMacTest : public ::testing::Test {
MidiManagerMacTest()
: manager_(new MidiManagerMac),
message_loop_(new base::MessageLoop) {}
+ ~MidiManagerMacTest() override {
+ manager_->Shutdown();
+ base::RunLoop run_loop;
+ run_loop.RunUntilIdle();
+ }
protected:
void StartSession(MidiManagerClient* client) {
« no previous file with comments | « media/midi/midi_manager.cc ('k') | media/midi/midi_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698