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

Unified Diff: third_party/WebKit/LayoutTests/usb/usb-connection-event.html

Issue 2816663002: Ensure tests don't depend on fake devices being added synchronously (Closed)
Patch Set: Define FakeUSBDevice class only once Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/usb.html ('k') | third_party/WebKit/LayoutTests/usb/usbDevice.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/usb/usb-connection-event.html
diff --git a/third_party/WebKit/LayoutTests/usb/usb-connection-event.html b/third_party/WebKit/LayoutTests/usb/usb-connection-event.html
index 6133f1bdd6f1f17679cad7b03d27810de3637da7..3bc65c4b3919263be7803c41c5f66f19d1be757a 100644
--- a/third_party/WebKit/LayoutTests/usb/usb-connection-event.html
+++ b/third_party/WebKit/LayoutTests/usb/usb-connection-event.html
@@ -8,13 +8,10 @@
'use strict';
usb_test(() => {
- navigator.usb.test.addFakeDevice(fakeDeviceInit);
-
- return navigator.usb.getDevices().then(devices => {
- assert_equals(devices.length, 1);
- let evt = new USBConnectionEvent('connect', { device: devices[0] });
+ return getFakeDevice().then(({ device }) => {
+ let evt = new USBConnectionEvent('connect', { device: device });
assert_equals(evt.type, 'connect');
- assert_equals(evt.device, devices[0]);
+ assert_equals(evt.device, device);
});
}, 'Can construct a USBConnectionEvent with a device');
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/usb.html ('k') | third_party/WebKit/LayoutTests/usb/usbDevice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698