summaryrefslogtreecommitdiffstats
path: root/extensions/test
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2015-04-16 12:11:04 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-16 19:12:05 +0000
commitb87cb277526092e101ce29f2ad0393f6247cc39e (patch)
treeffd0c2b8e4bb0519070cf000a872f78d83ae9791 /extensions/test
parente2ff83b4c95cbd9c0df8fd338c9afa39b861cb14 (diff)
downloadchromium_src-b87cb277526092e101ce29f2ad0393f6247cc39e.zip
chromium_src-b87cb277526092e101ce29f2ad0393f6247cc39e.tar.gz
chromium_src-b87cb277526092e101ce29f2ad0393f6247cc39e.tar.bz2
Move device/usb classes from the FILE thread to UI thread.
Code that interacts with device/usb often lives on the UI thread. As with the recent migration of device/hid (issue 422540) moving ownership of these classes to the UI thread makes calling code substancially simplier. Blocking operations are handled internally by posting tasks to the FILE thread and returning a result to the UI thread asynchronously. This change paves the way for replacing libusb with platform-specific implementations of these classes that may have different thread usage requirements (as is the case in the device/hid code). BUG=427985 Review URL: https://codereview.chromium.org/980023002 Cr-Commit-Position: refs/heads/master@{#325491}
Diffstat (limited to 'extensions/test')
-rw-r--r--extensions/test/data/api_test/usb/reset_device/test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/test/data/api_test/usb/reset_device/test.js b/extensions/test/data/api_test/usb/reset_device/test.js
index 2a39ada..e709fff 100644
--- a/extensions/test/data/api_test/usb/reset_device/test.js
+++ b/extensions/test/data/api_test/usb/reset_device/test.js
@@ -19,10 +19,10 @@ function resetDevice() {
usb.resetDevice(devices[0], function(result) {
chrome.test.assertLastError(
'Error resetting the device. The device has been closed.');
- chrome.test.assertEq(result, false);
+ chrome.test.assertEq(false, result);
usb.interruptTransfer(devices[0], transfer, function(result) {
- chrome.test.assertEq(result, undefined);
- chrome.test.assertLastError('No such device.');
+ chrome.test.assertEq(undefined, result);
+ chrome.test.assertLastError('No such connection.');
chrome.test.succeed();
});
});