OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.h" | 5 #include "media/midi/midi_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
19 #include "base/system_monitor/system_monitor.h" | 19 #include "base/system_monitor/system_monitor.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace midi { | 23 namespace midi { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
| 27 using mojom::Result; |
| 28 |
27 class FakeMidiManager : public MidiManager { | 29 class FakeMidiManager : public MidiManager { |
28 public: | 30 public: |
29 FakeMidiManager() | 31 FakeMidiManager() |
30 : start_initialization_is_called_(false), finalize_is_called_(false) {} | 32 : start_initialization_is_called_(false), finalize_is_called_(false) {} |
31 ~FakeMidiManager() override {} | 33 ~FakeMidiManager() override {} |
32 | 34 |
33 // MidiManager implementation. | 35 // MidiManager implementation. |
34 void StartInitialization() override { | 36 void StartInitialization() override { |
35 start_initialization_is_called_ = true; | 37 start_initialization_is_called_ = true; |
36 } | 38 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 base::RunLoop run_loop; | 291 base::RunLoop run_loop; |
290 run_loop.RunUntilIdle(); | 292 run_loop.RunUntilIdle(); |
291 } | 293 } |
292 | 294 |
293 // TODO(toyoshim): Add multi-threaded unit tests to check races around | 295 // TODO(toyoshim): Add multi-threaded unit tests to check races around |
294 // StartInitialization(), CompleteInitialization(), and Finalize(). | 296 // StartInitialization(), CompleteInitialization(), and Finalize(). |
295 | 297 |
296 } // namespace | 298 } // namespace |
297 | 299 |
298 } // namespace midi | 300 } // namespace midi |
OLD | NEW |