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_usb.h" | 5 #include "media/midi/midi_manager_usb.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "media/midi/usb_midi_device.h" | 18 #include "media/midi/usb_midi_device.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace midi { | 21 namespace midi { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
| 25 using mojom::Result; |
| 26 |
25 template<typename T, size_t N> | 27 template<typename T, size_t N> |
26 std::vector<T> ToVector(const T (&array)[N]) { | 28 std::vector<T> ToVector(const T (&array)[N]) { |
27 return std::vector<T>(array, array + N); | 29 return std::vector<T>(array, array + N); |
28 } | 30 } |
29 | 31 |
30 class Logger { | 32 class Logger { |
31 public: | 33 public: |
32 Logger() {} | 34 Logger() {} |
33 ~Logger() {} | 35 ~Logger() {} |
34 | 36 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 EXPECT_EQ(2u, manager_->output_streams()[0]->jack().jack_id); | 568 EXPECT_EQ(2u, manager_->output_streams()[0]->jack().jack_id); |
567 EXPECT_EQ(3u, manager_->output_streams()[1]->jack().jack_id); | 569 EXPECT_EQ(3u, manager_->output_streams()[1]->jack().jack_id); |
568 ASSERT_EQ(1u, jacks.size()); | 570 ASSERT_EQ(1u, jacks.size()); |
569 EXPECT_EQ(2, jacks[0].endpoint_number()); | 571 EXPECT_EQ(2, jacks[0].endpoint_number()); |
570 EXPECT_EQ("UsbMidiDevice::GetDescriptors\n", logger_.TakeLog()); | 572 EXPECT_EQ("UsbMidiDevice::GetDescriptors\n", logger_.TakeLog()); |
571 } | 573 } |
572 | 574 |
573 } // namespace | 575 } // namespace |
574 | 576 |
575 } // namespace midi | 577 } // namespace midi |
OLD | NEW |