Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: third_party/WebKit/LayoutTests/usb/resources/fake-devices.js

Issue 1734753003: Revert of First set of WebUSB layout tests with Mojo service mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 'use strict';
2
3 function fakeUsbDevices() {
4 return define('Fake USB Devices', [
5 'device/usb/public/interfaces/device.mojom',
6 ], device => Promise.resolve([
7 {
8 guid: 'CD9FA048-FC9B-7A71-DBFC-FD44B78D6397',
9 usb_version_major: 2,
10 usb_version_minor: 0,
11 usb_version_subminor: 0,
12 class_code: 7,
13 subclass_code: 1,
14 protocol_code: 2,
15 vendor_id: 0x18d1,
16 product_id: 0xf00d,
17 device_version_major: 1,
18 device_version_minor: 2,
19 device_version_subminor: 3,
20 manufacturer_name: 'Google, Inc.',
21 product_name: 'The amazing imaginary printer',
22 serial_number: '4',
23 configurations: [
24 {
25 configuration_value: 1,
26 configuration_name: 'Printer Mode',
27 interfaces: [
28 {
29 interface_number: 0,
30 alternates: [
31 {
32 alternate_setting: 0,
33 class_code: 0xff,
34 subclass_code: 0x01,
35 protocol_code: 0x01,
36 interface_name: 'Control',
37 endpoints: []
38 }
39 ]
40 },
41 {
42 interface_number: 1,
43 alternates: [
44 {
45 alternate_setting: 0,
46 class_code: 0xff,
47 subclass_code: 0x02,
48 protocol_code: 0x01,
49 interface_name: 'Data',
50 endpoints: [
51 {
52 endpoint_number: 1,
53 direction: device.TransferDirection.OUTBOUND,
54 type: device.EndpointType.BULK,
55 packet_size: 1024
56 }
57 ]
58 }
59 ]
60 }
61 ]
62 },
63 {
64 configuration_value: 2,
65 configuration_name: 'Fighting Robot Mode',
66 interfaces: [
67 {
68 interface_number: 0,
69 alternates: [
70 {
71 alternate_setting: 0,
72 class_code: 0xff,
73 subclass_code: 0x42,
74 protocol_code: 0x01,
75 interface_name: 'Disabled',
76 endpoints: []
77 },
78 {
79 alternate_setting: 1,
80 class_code: 0xff,
81 subclass_code: 0x42,
82 protocol_code: 0x01,
83 interface_name: 'Activate!',
84 endpoints: [
85 {
86 endpoint_number: 2,
87 direction: device.TransferDirection.INBOUND,
88 type: device.EndpointType.ISOCHRONOUS,
89 packet_size: 1024
90 },
91 {
92 endpoint_number: 2,
93 direction: device.TransferDirection.OUTBOUND,
94 type: device.EndpointType.ISOCHRONOUS,
95 packet_size: 1024
96 }
97 ]
98 }
99 ]
100 },
101 ]
102 }
103 ],
104 webusb_allowed_origins: { origins: [], configurations: [] },
105 }
106 ]));
107 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/mock-services.html ('k') | third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698