| OLD | NEW |
| (Empty) |
| 1 'use strict'; | |
| 2 | |
| 3 let fakeDeviceInit = { | |
| 4 usbVersionMajor: 2, | |
| 5 usbVersionMinor: 0, | |
| 6 usbVersionSubminor: 0, | |
| 7 deviceClass: 7, | |
| 8 deviceSubclass: 1, | |
| 9 deviceProtocol: 2, | |
| 10 vendorId: 0x18d1, | |
| 11 productId: 0xf00d, | |
| 12 deviceVersionMajor: 1, | |
| 13 deviceVersionMinor: 2, | |
| 14 deviceVersionSubminor: 3, | |
| 15 manufacturerName: 'Google, Inc.', | |
| 16 productName: 'The amazing imaginary printer', | |
| 17 serialNumber: '4', | |
| 18 activeConfigurationValue: 0, | |
| 19 configurations: [{ | |
| 20 configurationValue: 1, | |
| 21 configurationName: 'Printer Mode', | |
| 22 interfaces: [{ | |
| 23 interfaceNumber: 0, | |
| 24 alternates: [{ | |
| 25 alternateSetting: 0, | |
| 26 interfaceClass: 0xff, | |
| 27 interfaceSubclass: 0x01, | |
| 28 interfaceProtocol: 0x01, | |
| 29 interfaceName: 'Control', | |
| 30 endpoints: [{ | |
| 31 endpointNumber: 1, | |
| 32 direction: 'in', | |
| 33 type: 'interrupt', | |
| 34 packetSize: 8 | |
| 35 }] | |
| 36 }] | |
| 37 }, { | |
| 38 interfaceNumber: 1, | |
| 39 alternates: [{ | |
| 40 alternateSetting: 0, | |
| 41 interfaceClass: 0xff, | |
| 42 interfaceSubclass: 0x02, | |
| 43 interfaceProtocol: 0x01, | |
| 44 interfaceName: 'Data', | |
| 45 endpoints: [{ | |
| 46 endpointNumber: 2, | |
| 47 direction: 'in', | |
| 48 type: 'bulk', | |
| 49 packetSize: 1024 | |
| 50 }, { | |
| 51 endpointNumber: 2, | |
| 52 direction: 'out', | |
| 53 type: 'bulk', | |
| 54 packetSize: 1024 | |
| 55 }] | |
| 56 }] | |
| 57 }] | |
| 58 }, { | |
| 59 configurationValue: 2, | |
| 60 configurationName: 'Fighting Robot Mode', | |
| 61 interfaces: [{ | |
| 62 interfaceNumber: 0, | |
| 63 alternates: [{ | |
| 64 alternateSetting: 0, | |
| 65 interfaceClass: 0xff, | |
| 66 interfaceSubclass: 0x42, | |
| 67 interfaceProtocol: 0x01, | |
| 68 interfaceName: 'Disabled', | |
| 69 endpoints: [] | |
| 70 }, { | |
| 71 alternateSetting: 1, | |
| 72 interfaceClass: 0xff, | |
| 73 interfaceSubclass: 0x42, | |
| 74 interfaceProtocol: 0x01, | |
| 75 interfaceName: 'Activate!', | |
| 76 endpoints: [{ | |
| 77 endpointNumber: 1, | |
| 78 direction: 'in', | |
| 79 type: 'isochronous', | |
| 80 packetSize: 1024 | |
| 81 }, { | |
| 82 endpointNumber: 1, | |
| 83 direction: 'out', | |
| 84 type: 'isochronous', | |
| 85 packetSize: 1024 | |
| 86 }] | |
| 87 }] | |
| 88 }] | |
| 89 }] | |
| 90 }; | |
| OLD | NEW |