OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |