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 "device/serial/serial_device_enumerator.h" | 5 #include "device/serial/serial_device_enumerator.h" |
6 #include "device/serial/serial_service_impl.h" | 6 #include "device/serial/serial_service_impl.h" |
7 #include "device/serial/test_serial_io_handler.h" | 7 #include "device/serial/test_serial_io_handler.h" |
8 #include "extensions/renderer/api_test_base.h" | 8 #include "extensions/renderer/api_test_base.h" |
9 #include "grit/extensions_renderer_resources.h" | 9 #include "grit/extensions_renderer_resources.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 result[0]->has_vendor_id = true; | 26 result[0]->has_vendor_id = true; |
27 result[0]->product_id = 5678; | 27 result[0]->product_id = 5678; |
28 result[0]->has_product_id = true; | 28 result[0]->has_product_id = true; |
29 result[0]->display_name = "foo"; | 29 result[0]->display_name = "foo"; |
30 result[1] = device::serial::DeviceInfo::New(); | 30 result[1] = device::serial::DeviceInfo::New(); |
31 result[1]->path = "another_device"; | 31 result[1]->path = "another_device"; |
32 // These IDs should be ignored. | 32 // These IDs should be ignored. |
33 result[1]->vendor_id = 1234; | 33 result[1]->vendor_id = 1234; |
34 result[1]->product_id = 5678; | 34 result[1]->product_id = 5678; |
35 result[2] = device::serial::DeviceInfo::New(); | 35 result[2] = device::serial::DeviceInfo::New(); |
| 36 result[2]->path = ""; |
36 result[2]->display_name = ""; | 37 result[2]->display_name = ""; |
37 return result.Pass(); | 38 return result.Pass(); |
38 } | 39 } |
39 }; | 40 }; |
40 | 41 |
41 enum OptionalValue { | 42 enum OptionalValue { |
42 OPTIONAL_VALUE_UNSET, | 43 OPTIONAL_VALUE_UNSET, |
43 OPTIONAL_VALUE_FALSE, | 44 OPTIONAL_VALUE_FALSE, |
44 OPTIONAL_VALUE_TRUE, | 45 OPTIONAL_VALUE_TRUE, |
45 }; | 46 }; |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 614 |
614 TEST_F(SerialApiTest, SetPausedUnknownConnectionId) { | 615 TEST_F(SerialApiTest, SetPausedUnknownConnectionId) { |
615 RunTest("serial_unittest.js", "testSetPausedUnknownConnectionId"); | 616 RunTest("serial_unittest.js", "testSetPausedUnknownConnectionId"); |
616 } | 617 } |
617 | 618 |
618 TEST_F(SerialApiTest, SendUnknownConnectionId) { | 619 TEST_F(SerialApiTest, SendUnknownConnectionId) { |
619 RunTest("serial_unittest.js", "testSendUnknownConnectionId"); | 620 RunTest("serial_unittest.js", "testSendUnknownConnectionId"); |
620 } | 621 } |
621 | 622 |
622 } // namespace extensions | 623 } // namespace extensions |
OLD | NEW |