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

Side by Side Diff: media/midi/midi_manager_mac_unittest.cc

Issue 2673423002: Web MIDI: add dynamic MidiManager instantiation support for Linux (Closed)
Patch Set: rebase again Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « media/midi/midi_manager_mac.cc ('k') | media/midi/midi_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/midi/midi_manager_mac.h" 5 #include "media/midi/midi_manager_mac.h"
6 6
7 #include <CoreMIDI/MIDIServices.h> 7 #include <CoreMIDI/MIDIServices.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 MidiPortInfo info_; 105 MidiPortInfo info_;
106 bool wait_for_port_; 106 bool wait_for_port_;
107 bool unexpected_callback_; 107 bool unexpected_callback_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(FakeMidiManagerClient); 109 DISALLOW_COPY_AND_ASSIGN(FakeMidiManagerClient);
110 }; 110 };
111 111
112 class MidiManagerMacTest : public ::testing::Test { 112 class MidiManagerMacTest : public ::testing::Test {
113 public: 113 public:
114 MidiManagerMacTest() 114 MidiManagerMacTest()
115 : manager_(new MidiManagerMac), 115 : manager_(new MidiManagerMac(nullptr)),
116 message_loop_(new base::MessageLoop) {} 116 message_loop_(new base::MessageLoop) {}
117 ~MidiManagerMacTest() override { 117 ~MidiManagerMacTest() override {
118 manager_->Shutdown(); 118 manager_->Shutdown();
119 base::RunLoop run_loop; 119 base::RunLoop run_loop;
120 run_loop.RunUntilIdle(); 120 run_loop.RunUntilIdle();
121 } 121 }
122 122
123 protected: 123 protected:
124 void StartSession(MidiManagerClient* client) { 124 void StartSession(MidiManagerClient* client) {
125 manager_->StartSession(client); 125 manager_->StartSession(client);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 EndSession(client.get()); 166 EndSession(client.get());
167 if (ep) 167 if (ep)
168 MIDIEndpointDispose(ep); 168 MIDIEndpointDispose(ep);
169 if (midi_client) 169 if (midi_client)
170 MIDIClientDispose(midi_client); 170 MIDIClientDispose(midi_client);
171 } 171 }
172 172
173 } // namespace 173 } // namespace
174 174
175 } // namespace midi 175 } // namespace midi
OLDNEW
« no previous file with comments | « media/midi/midi_manager_mac.cc ('k') | media/midi/midi_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698