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

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

Issue 695613002: Move the USB API tests into app_shell_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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.usb;
6
7 function getDevices() {
8 usb.getDevices({
9 vendorId: 0,
10 productId: 0
11 }, function(devices) {
12 usb.openDevice(devices[0], function(handle) {
13 usb.closeDevice(handle);
14 chrome.test.succeed();
15 });
16 });
17 }
18
19 function explicitCloseDevice() {
20 usb.findDevices({
21 vendorId: 0,
22 productId: 0
23 }, function(devices) {
24 usb.closeDevice(devices[0]);
25 chrome.test.succeed();
26 });
27 }
28
29 chrome.test.runTests([
30 getDevices, explicitCloseDevice
31 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698