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

Side by Side Diff: chrome/test/data/extensions/api_test/usb/zero_length_transfer/test.js

Issue 10824298: Adding tests for USB extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC fix for warning about the old version of their compiler being broken. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/usb/zero_length_transfer/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var usb = chrome.experimental.usb;
6
7 function handler() {
8 var handlerObject = new Object();
9 handlerObject.onEvent = chrome.test.callbackAdded();
10 return handlerObject;
11 }
12
13 var tests = [
14 function zeroLengthTransfer() {
15 usb.findDevice(0, 0, handler(), function(device) {
16 var transfer = new Object();
17 transfer.direction = "out";
18 transfer.endpoint = 1;
19 transfer.data = new ArrayBuffer(0);
20 usb.bulkTransfer(device, transfer);
21 });
22 },
23 ];
24
25 chrome.test.runTests(tests);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/usb/zero_length_transfer/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698