OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 function failOnError(result) { |
| 6 if (chrome.runtime.lastError || !result) { |
| 7 chrome.test.fail(chrome.runtime.lastError.message); |
| 8 return true; |
| 9 } |
| 10 return false; |
| 11 } |
| 12 |
| 13 var service = { uuid: '00001234-0000-1000-8000-00805f9b34fb', isPrimary: true } |
| 14 chrome.bluetoothLowEnergy.createService(service, function(result) { |
| 15 if (failOnError(result)) |
| 16 return; |
| 17 chrome.test.succeed(); |
| 18 }); |
OLD | NEW |