Index: media/midi/usb_midi_descriptor_parser_unittest.cc |
diff --git a/media/midi/usb_midi_descriptor_parser_unittest.cc b/media/midi/usb_midi_descriptor_parser_unittest.cc |
index c0e569dd72b2f8437a3827f90c7b2a9f01d7423c..e0a68cceb71b2acd561a8e9729c3c799a6ef351a 100644 |
--- a/media/midi/usb_midi_descriptor_parser_unittest.cc |
+++ b/media/midi/usb_midi_descriptor_parser_unittest.cc |
@@ -21,7 +21,7 @@ TEST(UsbMidiDescriptorParserTest, ParseEmpty) { |
TEST(UsbMidiDescriptorParserTest, InvalidSize) { |
UsbMidiDescriptorParser parser; |
std::vector<UsbMidiJack> jacks; |
- uint8 data[] = {0x04}; |
+ uint8_t data[] = {0x04}; |
EXPECT_FALSE(parser.Parse(nullptr, data, arraysize(data), &jacks)); |
EXPECT_TRUE(jacks.empty()); |
} |
@@ -31,10 +31,9 @@ TEST(UsbMidiDescriptorParserTest, NonExistingJackIsAssociated) { |
std::vector<UsbMidiJack> jacks; |
// Jack id=1 is found in a CS_ENDPOINT descriptor, but there is no definition |
// for the jack. |
- uint8 data[] = { |
- 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x07, |
- 0x24, 0x01, 0x00, 0x01, 0x07, 0x00, 0x05, 0x25, 0x01, 0x01, |
- 0x01, |
+ uint8_t data[] = { |
+ 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x07, 0x24, |
+ 0x01, 0x00, 0x01, 0x07, 0x00, 0x05, 0x25, 0x01, 0x01, 0x01, |
}; |
EXPECT_FALSE(parser.Parse(nullptr, data, arraysize(data), &jacks)); |
EXPECT_TRUE(jacks.empty()); |
@@ -46,10 +45,9 @@ TEST(UsbMidiDescriptorParserTest, |
std::vector<UsbMidiJack> jacks; |
// a NON-MIDI INTERFACE descriptor followed by ENDPOINT and CS_ENDPOINT |
// descriptors (Compare with the previous test case). |
- uint8 data[] = { |
- 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x02, 0x00, 0x00, 0x07, |
- 0x24, 0x01, 0x00, 0x01, 0x07, 0x00, 0x05, 0x25, 0x01, 0x01, |
- 0x01, |
+ uint8_t data[] = { |
+ 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, |
+ 0x01, 0x00, 0x01, 0x07, 0x00, 0x05, 0x25, 0x01, 0x01, 0x01, |
}; |
EXPECT_TRUE(parser.Parse(nullptr, data, arraysize(data), &jacks)); |
EXPECT_TRUE(jacks.empty()); |
@@ -59,21 +57,19 @@ TEST(UsbMidiDescriptorParserTest, Parse) { |
UsbMidiDescriptorParser parser; |
std::vector<UsbMidiJack> jacks; |
// A complete device descriptor. |
- uint8 data[] = { |
- 0x12, 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x08, 0x86, 0x1a, |
- 0x2d, 0x75, 0x54, 0x02, 0x00, 0x02, 0x00, 0x01, 0x09, 0x02, |
- 0x75, 0x00, 0x02, 0x01, 0x00, 0x80, 0x30, 0x09, 0x04, 0x00, |
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x09, 0x24, 0x01, 0x00, |
- 0x01, 0x09, 0x00, 0x01, 0x01, 0x09, 0x04, 0x01, 0x00, 0x02, |
- 0x01, 0x03, 0x00, 0x00, 0x07, 0x24, 0x01, 0x00, 0x01, 0x51, |
- 0x00, 0x06, 0x24, 0x02, 0x01, 0x02, 0x00, 0x06, 0x24, 0x02, |
- 0x01, 0x03, 0x00, 0x06, 0x24, 0x02, 0x02, 0x06, 0x00, 0x09, |
- 0x24, 0x03, 0x01, 0x07, 0x01, 0x06, 0x01, 0x00, 0x09, 0x24, |
- 0x03, 0x02, 0x04, 0x01, 0x02, 0x01, 0x00, 0x09, 0x24, 0x03, |
- 0x02, 0x05, 0x01, 0x03, 0x01, 0x00, 0x09, 0x05, 0x02, 0x02, |
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x25, 0x01, 0x02, 0x02, |
- 0x03, 0x09, 0x05, 0x82, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, |
- 0x05, 0x25, 0x01, 0x01, 0x07, |
+ uint8_t data[] = { |
+ 0x12, 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x08, 0x86, 0x1a, 0x2d, 0x75, |
+ 0x54, 0x02, 0x00, 0x02, 0x00, 0x01, 0x09, 0x02, 0x75, 0x00, 0x02, 0x01, |
+ 0x00, 0x80, 0x30, 0x09, 0x04, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, |
+ 0x09, 0x24, 0x01, 0x00, 0x01, 0x09, 0x00, 0x01, 0x01, 0x09, 0x04, 0x01, |
+ 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x07, 0x24, 0x01, 0x00, 0x01, 0x51, |
+ 0x00, 0x06, 0x24, 0x02, 0x01, 0x02, 0x00, 0x06, 0x24, 0x02, 0x01, 0x03, |
+ 0x00, 0x06, 0x24, 0x02, 0x02, 0x06, 0x00, 0x09, 0x24, 0x03, 0x01, 0x07, |
+ 0x01, 0x06, 0x01, 0x00, 0x09, 0x24, 0x03, 0x02, 0x04, 0x01, 0x02, 0x01, |
+ 0x00, 0x09, 0x24, 0x03, 0x02, 0x05, 0x01, 0x03, 0x01, 0x00, 0x09, 0x05, |
+ 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x25, 0x01, 0x02, 0x02, |
+ 0x03, 0x09, 0x05, 0x82, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x25, |
+ 0x01, 0x01, 0x07, |
}; |
EXPECT_TRUE(parser.Parse(nullptr, data, arraysize(data), &jacks)); |
ASSERT_EQ(3u, jacks.size()); |
@@ -106,9 +102,9 @@ TEST(UsbMidiDescriptorParserTest, ParseDeviceInfoEmpty) { |
TEST(UsbMidiDescriptorParserTest, ParseDeviceInfo) { |
UsbMidiDescriptorParser parser; |
UsbMidiDescriptorParser::DeviceInfo info; |
- uint8 data[] = { |
- 0x12, 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, 0x23, |
- 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x00, 0x0a, |
+ uint8_t data[] = { |
+ 0x12, 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, |
+ 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x00, 0x0a, |
}; |
EXPECT_TRUE(parser.ParseDeviceInfo(data, arraysize(data), &info)); |