| 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() {}));
|
| + });
|
| });
|
| };
|
| }
|
|
|