| 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/usb_midi_input_stream.h" |    5 #include "media/midi/usb_midi_input_stream.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 <string> |   11 #include <string> | 
|   12 #include <vector> |   12 #include <vector> | 
|   13  |   13  | 
|   14 #include "base/macros.h" |   14 #include "base/macros.h" | 
|   15 #include "base/strings/stringprintf.h" |   15 #include "base/strings/stringprintf.h" | 
|   16 #include "base/time/time.h" |   16 #include "base/time/time.h" | 
|   17 #include "media/midi/usb_midi_device.h" |   17 #include "media/midi/usb_midi_device.h" | 
|   18 #include "testing/gtest/include/gtest/gtest.h" |   18 #include "testing/gtest/include/gtest/gtest.h" | 
|   19  |   19  | 
|   20 using base::TimeTicks; |   20 using base::TimeTicks; | 
|   21  |   21  | 
|   22 namespace media { |  | 
|   23 namespace midi { |   22 namespace midi { | 
|   24  |   23  | 
|   25 namespace { |   24 namespace { | 
|   26  |   25  | 
|   27 class TestUsbMidiDevice : public UsbMidiDevice { |   26 class TestUsbMidiDevice : public UsbMidiDevice { | 
|   28  public: |   27  public: | 
|   29   TestUsbMidiDevice() {} |   28   TestUsbMidiDevice() {} | 
|   30   ~TestUsbMidiDevice() override {} |   29   ~TestUsbMidiDevice() override {} | 
|   31   std::vector<uint8_t> GetDescriptors() override { |   30   std::vector<uint8_t> GetDescriptors() override { | 
|   32     return std::vector<uint8_t>(); |   31     return std::vector<uint8_t>(); | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  163 TEST_F(UsbMidiInputStreamTest, DispatchForDevice2) { |  162 TEST_F(UsbMidiInputStreamTest, DispatchForDevice2) { | 
|  164   uint8_t data[] = {0x4f, 0xf8, 0x00, 0x00}; |  163   uint8_t data[] = {0x4f, 0xf8, 0x00, 0x00}; | 
|  165  |  164  | 
|  166   stream_->OnReceivedData(&device2_, 7, data, arraysize(data), TimeTicks()); |  165   stream_->OnReceivedData(&device2_, 7, data, arraysize(data), TimeTicks()); | 
|  167   EXPECT_EQ("0xf8 \n", delegate_.received_data()); |  166   EXPECT_EQ("0xf8 \n", delegate_.received_data()); | 
|  168 } |  167 } | 
|  169  |  168  | 
|  170 }  // namespace |  169 }  // namespace | 
|  171  |  170  | 
|  172 }  // namespace midi |  171 }  // namespace midi | 
|  173 }  // namespace media |  | 
| OLD | NEW |