Add more checks to investigate SupervisedUserPrefStore crash at startup.
[chromium-blink-merge.git] / extensions / test / data / api_test / usb / set_configuration / test.js
blobcc37b0191bad56cdfd2d7d51cd202b531ad974e5
1 // Copyright (c) 2014 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 setConfiguration() {
9 usb.findDevices({vendorId: 0, productId: 0}, function (devices) {
10 var device = devices[0];
11 usb.getConfiguration(device, function (result) {
12 chrome.test.assertLastError("The device is not in a configured state.");
13 usb.setConfiguration(device, 1, function () {
14 chrome.test.assertNoLastError();
15 usb.getConfiguration(device, function (result) {
16 chrome.test.assertNoLastError();
17 chrome.test.succeed();
18 });
19 });
20 });
21 });
25 chrome.test.runTests(tests);