| 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_alsa.h" | 5 #include "media/midi/midi_manager_alsa.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 namespace midi { |
| 10 | 11 |
| 11 class MidiManagerAlsaTest : public ::testing::Test { | 12 class MidiManagerAlsaTest : public ::testing::Test { |
| 12 protected: | 13 protected: |
| 13 void SetUp() override { | 14 void SetUp() override { |
| 14 // Pre-instantiate typical MidiPort instances that are often used in | 15 // Pre-instantiate typical MidiPort instances that are often used in |
| 15 // following tests. | 16 // following tests. |
| 16 | 17 |
| 17 // Inputs. port_input_0_ == port_input_1_. | 18 // Inputs. port_input_0_ == port_input_1_. |
| 18 port_input_0_.reset(new MidiManagerAlsa::MidiPort( | 19 port_input_0_.reset(new MidiManagerAlsa::MidiPort( |
| 19 "path", "id", 1, 2, 5, "client_name", "port_name", "manufacturer", | 20 "path", "id", 1, 2, 5, "client_name", "port_name", "manufacturer", |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 | 586 |
| 586 // Verify the last entry. | 587 // Verify the last entry. |
| 587 EXPECT_TRUE((*alsa_seq_state_0_.ToMidiPortState()->begin()) | 588 EXPECT_TRUE((*alsa_seq_state_0_.ToMidiPortState()->begin()) |
| 588 ->MatchConnected(MidiManagerAlsa::MidiPort( | 589 ->MatchConnected(MidiManagerAlsa::MidiPort( |
| 589 "", "", 0, 1, -1, "0", "0:1", "", "", | 590 "", "", 0, 1, -1, "0", "0:1", "", "", |
| 590 MidiManagerAlsa::MidiPort::Type::kOutput))); | 591 MidiManagerAlsa::MidiPort::Type::kOutput))); |
| 591 } | 592 } |
| 592 | 593 |
| 593 // TODO(agoode): Test old -> new state event generation, using mocks. | 594 // TODO(agoode): Test old -> new state event generation, using mocks. |
| 594 | 595 |
| 596 } // namespace midi |
| 595 } // namespace media | 597 } // namespace media |
| OLD | NEW |