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

Unified Diff: chrome/test/data/extensions/api_test/usb/invalid_length_transfer/test.js

Issue 16316004: Separate usb device handle from usb device. (deprecate) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the threading mess Created 7 years, 6 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
Index: chrome/test/data/extensions/api_test/usb/invalid_length_transfer/test.js
diff --git a/chrome/test/data/extensions/api_test/usb/invalid_length_transfer/test.js b/chrome/test/data/extensions/api_test/usb/invalid_length_transfer/test.js
index 12ebe40252a51f51fe4c66ea1cbf8b32a79f611b..9b37b724950e1e340209f149c79f19dc09256f19 100644
--- a/chrome/test/data/extensions/api_test/usb/invalid_length_transfer/test.js
+++ b/chrome/test/data/extensions/api_test/usb/invalid_length_transfer/test.js
@@ -38,10 +38,11 @@ function createInvalidTransferTest(usbFunction, transferInfo, transferLength) {
return function() {
genericTransfer["length"] = transferLength;
controlTransfer["length"] = transferLength;
- usb.findDevices({vendorId: 0, productId: 0}, function(devices) {
- var device = devices[0];
- usbFunction(device, transferInfo, chrome.test.callbackFail(
- errorTransferLength, function() {}));
+ usb.getDevices({vendorId: 0, productId: 0}, function(devices) {
+ usb.openDevice(devices[0], function(device) {
+ usbFunction(device, transferInfo, chrome.test.callbackFail(
+ errorTransferLength, function() {}));
+ });
});
};
}
@@ -52,11 +53,11 @@ function createInvalidPacketLengthTest(
genericTransfer["length"] = transferLength;
isoTransfer["packets"] = packets;
isoTransfer["packetLength"] = packetLength;
- usb.findDevices({vendorId: 0, productId: 0}, function(devices) {
- var device = devices[0];
- usb.isochronousTransfer(device, isoTransfer,
- chrome.test.callbackFail(
- errorMessage, function() {}));
+ usb.getDevices({vendorId: 0, productId: 0}, function(devices) {
+ usb.openDevice(devices[0], function(device) {
+ usb.isochronousTransfer(device, isoTransfer,
+ chrome.test.callbackFail(errorMessage, function() {}));
+ });
});
};
}

Powered by Google App Engine
This is Rietveld 408576698