Elim cr-checkbox
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / bluetooth / get_devices / runtest.js
bloba6c29103f5e068c203f139a2f56471c071370bfa
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 function testGetDevices() {
6 chrome.test.assertEq(2, devices.length);
7 chrome.test.assertEq('d1', devices[0].name);
8 chrome.test.assertEq('d2', devices[1].name);
10 chrome.test.succeed();
13 var devices = null;
15 function failOnError() {
16 if (chrome.runtime.lastError) {
17 chrome.test.fail(chrome.runtime.lastError.message);
21 chrome.bluetooth.getDevices(
22 function(result) {
23 failOnError();
24 devices = result;
25 chrome.test.sendMessage('ready',
26 function(message) {
27 chrome.test.runTests([testGetDevices]);
28 });
29 });