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

Unified Diff: third_party/WebKit/LayoutTests/usb/usbDevice-iframe.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/usbDevice.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
diff --git a/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html b/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
index b63743da10699cf677932f9f6b718a476223db38..b6514072106d3b1b10da023a877cb1fe70a3c2ac 100644
--- a/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
+++ b/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
@@ -11,7 +11,7 @@ function runIframeDisconnectTest(onDeviceConnected) {
return navigator.usb.test.initialize().then(() => {
return new Promise((resolve, reject) => {
let opened = false;
- let fakeDeviceGuid = null;
+ let fakeDevice = null;
let iframe = document.createElement('iframe');
iframe.src = 'resources/open-in-iframe.html';
@@ -23,7 +23,7 @@ function runIframeDisconnectTest(onDeviceConnected) {
window.onmessage = messageEvent => {
if (messageEvent.data == 'Ready') {
- fakeDeviceGuid = navigator.usb.test.addFakeDevice(fakeDeviceInit);
+ fakeDevice = navigator.usb.test.addFakeDevice(fakeDeviceInit);
} else if (messageEvent.data == 'Success') {
opened = true;
onDeviceConnected(iframe);
@@ -32,8 +32,8 @@ function runIframeDisconnectTest(onDeviceConnected) {
}
};
- navigator.usb.test.ondeviceclose = guid => {
- assert_equals(guid, fakeDeviceGuid);
+ navigator.usb.test.ondeviceclose = closedFakeDevice => {
+ assert_equals(closedFakeDevice, fakeDevice);
assert_true(opened);
resolve();
};
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/usbDevice.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698