Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / extensions / test / data / api_test / usb / zero_length_transfer / test.js
blob01ab98916ebffdc2f8d2484eec210cbad8dd507f
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.
5 var usb = chrome.usb;
7 var tests = [
8 function zeroLengthTransfer() {
9 usb.findDevices({vendorId: 0, productId: 0}, function(devices) {
10 var device = devices[0];
11 var transfer = new Object();
12 transfer.direction = "out";
13 transfer.endpoint = 1;
14 transfer.data = new ArrayBuffer(0);
15 usb.bulkTransfer(device, transfer, function (result) {
16 chrome.test.succeed();
17 });
18 });
22 chrome.test.runTests(tests);