1 // Copyright 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 function testGetDevice() {
6 chrome.test.assertEq(1, devices.length);
7 chrome.test.assertEq('d1', devices[0].name);
14 function failOnError() {
15 if (chrome.runtime.lastError) {
16 chrome.test.fail(chrome.runtime.lastError.message);
20 chrome.bluetooth.getDevice('11:12:13:14:15:16',
25 chrome.bluetooth.getDevice('21:22:23:24:25:26',
27 // device should not exists
28 if (device || !chrome.runtime.lastError) {
29 chrome.test.fail('Unexpected device or missing error');
32 chrome.test.sendMessage('ready',
34 chrome.test.runTests([testGetDevice]);