| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_message_queue.h" | 5 #include "media/midi/midi_message_queue.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace media { | |
| 13 namespace midi { | 12 namespace midi { |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 const uint8_t kGMOn[] = {0xf0, 0x7e, 0x7f, 0x09, 0x01, 0xf7}; | 15 const uint8_t kGMOn[] = {0xf0, 0x7e, 0x7f, 0x09, 0x01, 0xf7}; |
| 17 const uint8_t kPartialGMOn1st[] = {0xf0}; | 16 const uint8_t kPartialGMOn1st[] = {0xf0}; |
| 18 const uint8_t kPartialGMOn2nd[] = {0x7e, 0x7f, 0x09, 0x01}; | 17 const uint8_t kPartialGMOn2nd[] = {0x7e, 0x7f, 0x09, 0x01}; |
| 19 const uint8_t kPartialGMOn3rd[] = {0xf7}; | 18 const uint8_t kPartialGMOn3rd[] = {0xf7}; |
| 20 const uint8_t kGSOn[] = { | 19 const uint8_t kGSOn[] = { |
| 21 0xf0, 0x41, 0x10, 0x42, 0x12, 0x40, 0x00, 0x7f, 0x00, 0x41, 0xf7, | 20 0xf0, 0x41, 0x10, 0x42, 0x12, 0x40, 0x00, 0x7f, 0x00, 0x41, 0xf7, |
| 22 }; | 21 }; |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 Add(&queue, kReservedMessage1WithDataBytes); | 563 Add(&queue, kReservedMessage1WithDataBytes); |
| 565 queue.Get(&message); | 564 queue.Get(&message); |
| 566 EXPECT_TRUE(message.empty()); | 565 EXPECT_TRUE(message.empty()); |
| 567 Add(&queue, kPartialGMOn3rd); | 566 Add(&queue, kPartialGMOn3rd); |
| 568 queue.Get(&message); | 567 queue.Get(&message); |
| 569 EXPECT_TRUE(message.empty()); | 568 EXPECT_TRUE(message.empty()); |
| 570 } | 569 } |
| 571 | 570 |
| 572 } // namespace | 571 } // namespace |
| 573 } // namespace midi | 572 } // namespace midi |
| 574 } // namespace media | |
| OLD | NEW |