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 var getCharacteristic = chrome.bluetoothLowEnergy.getCharacteristic;
6 var charId = 'char_id0';
8 getCharacteristic(charId, function (result) {
9 if (chrome.runtime.lastError) {
10 chrome.test.sendMessage(chrome.runtime.lastError.message);
13 chrome.test.assertEq(charId, result.instanceId);
15 chrome.test.sendMessage('ready', function (message) {
16 getCharacteristic(charId, function (result) {
17 if (result || !chrome.runtime.lastError) {
18 chrome.test.sendMessage('Call to getCharacteristic should have failed');
21 chrome.test.sendMessage('ready', function (message) {
22 chrome.test.succeed();