Index: chrome/test/data/extensions/api_test/usb/device_handling/test.js |
diff --git a/chrome/test/data/extensions/api_test/usb/device_handling/test.js b/chrome/test/data/extensions/api_test/usb/device_handling/test.js |
index 55d657c1d71930aa99b9c968c17b4513a7b36e62..fefe916028ba927fd646be9a1b5084f31291c56e 100644 |
--- a/chrome/test/data/extensions/api_test/usb/device_handling/test.js |
+++ b/chrome/test/data/extensions/api_test/usb/device_handling/test.js |
@@ -5,39 +5,21 @@ |
var usb = chrome.usb; |
var tests = [ |
+ function getDevices() { |
+ usb.getDevices({vendorId: 0, productId: 0}, function(devices) { |
+ console.log(devices); |
+ usb.openDevice(devices[0], function(handle){ |
+ usb.closeDevice(handle); |
+ chrome.test.succeed(); |
+ }); |
+ }); |
+ }, |
function explicitCloseDevice() { |
usb.findDevices({vendorId: 0, productId: 0}, function(devices) { |
usb.closeDevice(devices[0]); |
chrome.test.succeed(); |
}); |
- }, |
- function resetDevice() { |
- usb.findDevices({vendorId: 0, productId: 0}, function(devices) { |
- usb.resetDevice(devices[0], function(result) { |
- chrome.test.assertEq(result, true); |
- // Ensure the device is still open. |
- var transfer = { |
- direction: "out", |
- endpoint: 2, |
- data: new ArrayBuffer(1) |
- }; |
- usb.interruptTransfer(devices[0], transfer, function(result) { |
- // This is designed to fail. |
- usb.resetDevice(devices[0], function(result) { |
- chrome.test.assertEq(result, false); |
- usb.interruptTransfer(devices[0], transfer, function(result) { |
- chrome.test.assertEq(result, undefined); |
- chrome.test.assertEq( |
- chrome.runtime.lastError && chrome.runtime.lastError.message, |
- 'No such device.' |
- ); |
- chrome.test.succeed(); |
- }); |
- }); |
- }); |
- }); |
- }); |
- }, |
+ } |
]; |
chrome.test.runTests(tests); |