Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 'use strict'; | |
| 2 | |
| 3 const fakeUsbDevices = new Promise(resolve => { | |
| 4 define('Fake USB Devices', [ | |
| 5 'device/usb/public/interfaces/device.mojom', | |
| 6 ], device => { | |
| 7 resolve([ | |
|
Ken Rockot(use gerrit already)
2016/02/23 23:12:48
Will we never want to refer to fake devices by nam
| |
| 8 { | |
| 9 guid: 'CD9FA048-FC9B-7A71-DBFC-FD44B78D6397', | |
| 10 usb_version_major: 2, | |
| 11 usb_version_minor: 0, | |
| 12 usb_version_subminor: 0, | |
| 13 class_code: 7, | |
| 14 subclass_code: 1, | |
| 15 protocol_code: 2, | |
| 16 vendor_id: 0x18d1, | |
| 17 product_id: 0xf00d, | |
| 18 device_version_major: 1, | |
| 19 device_version_minor: 2, | |
| 20 device_version_subminor: 3, | |
| 21 manufacturer_name: 'Google, Inc.', | |
| 22 product_name: 'The amazing imaginary printer', | |
| 23 serial_number: '4', | |
| 24 configurations: [ | |
| 25 { | |
| 26 configuration_value: 1, | |
| 27 configuration_name: "Printer Mode", | |
|
Ken Rockot(use gerrit already)
2016/02/23 23:12:48
nit: please use consistent quotes, so either '' or
Reilly Grant (use Gerrit)
2016/02/24 20:18:47
Done.
| |
| 28 interfaces: [ | |
| 29 { | |
| 30 interface_number: 0, | |
| 31 alternates: [ | |
| 32 { | |
| 33 alternate_setting: 0, | |
| 34 class_code: 0xff, | |
| 35 subclass_code: 0x01, | |
| 36 protocol_code: 0x01, | |
| 37 interface_name: "Control", | |
| 38 endpoints: [] | |
| 39 } | |
| 40 ] | |
| 41 }, | |
| 42 { | |
| 43 interface_number: 1, | |
| 44 alternates: [ | |
| 45 { | |
| 46 alternate_setting: 0, | |
| 47 class_code: 0xff, | |
| 48 subclass_code: 0x02, | |
| 49 protocol_code: 0x01, | |
| 50 interface_name: "Data", | |
| 51 endpoints: [ | |
| 52 { | |
| 53 endpoint_number: 1, | |
| 54 direction: device.TransferDirection.OUTBOUND, | |
| 55 type: device.EndpointType.BULK, | |
| 56 packet_size: 1024 | |
| 57 } | |
| 58 ] | |
| 59 } | |
| 60 ] | |
| 61 } | |
| 62 ] | |
| 63 }, | |
| 64 { | |
| 65 configuration_value: 2, | |
| 66 configuration_name: "Fighting Robot Mode", | |
| 67 interfaces: [ | |
| 68 { | |
| 69 interface_number: 0, | |
| 70 alternates: [ | |
| 71 { | |
| 72 alternate_setting: 0, | |
| 73 class_code: 0xff, | |
| 74 subclass_code: 0x42, | |
| 75 protocol_code: 0x01, | |
| 76 interface_name: "Disabled", | |
| 77 endpoints: [] | |
| 78 }, | |
| 79 { | |
| 80 alternate_setting: 1, | |
| 81 class_code: 0xff, | |
| 82 subclass_code: 0x42, | |
| 83 protocol_code: 0x01, | |
| 84 interface_name: "Activate!", | |
| 85 endpoints: [ | |
| 86 { | |
| 87 endpoint_number: 2, | |
| 88 direction: device.TransferDirection.INBOUND, | |
| 89 type: device.EndpointType.ISOCHRONOUS, | |
| 90 packet_size: 1024 | |
| 91 }, | |
| 92 { | |
| 93 endpoint_number: 2, | |
| 94 direction: device.TransferDirection.OUTBOUND, | |
| 95 type: device.EndpointType.ISOCHRONOUS, | |
| 96 packet_size: 1024 | |
| 97 } | |
| 98 ] | |
| 99 } | |
| 100 ] | |
| 101 }, | |
| 102 ] | |
| 103 } | |
| 104 ], | |
| 105 webusb_allowed_origins: { origins: [], configurations: [] }, | |
| 106 } | |
| 107 ]); | |
| 108 }); | |
| 109 }); | |
| OLD | NEW |