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

Unified Diff: media/midi/midi_manager_usb_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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_usb_unittest.cc
diff --git a/media/midi/midi_manager_usb_unittest.cc b/media/midi/midi_manager_usb_unittest.cc
index e2205aa3b4640fabf673d71e8de9d9d456e63e93..a9b90a9a10884a5aee5649e47ea8335799eaba51 100644
--- a/media/midi/midi_manager_usb_unittest.cc
+++ b/media/midi/midi_manager_usb_unittest.cc
@@ -131,6 +131,8 @@ class FakeMidiManagerClient : public MidiManagerClient {
static_cast<unsigned>(size)));
}
+ void Detach() override {}
+
bool complete_start_session_;
Result result_;
MidiPortInfoList input_ports_;
@@ -182,6 +184,10 @@ class MidiManagerUsbTest : public ::testing::Test {
manager_.reset(new MidiManagerUsbForTesting(factory.Pass()));
}
~MidiManagerUsbTest() override {
+ manager_->Shutdown();
+ base::RunLoop run_loop;
+ run_loop.RunUntilIdle();
+
std::string leftover_logs = logger_.TakeLog();
if (!leftover_logs.empty()) {
ADD_FAILURE() << "Log should be empty: " << leftover_logs;
« no previous file with comments | « media/midi/midi_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698