| Index: chrome/test/data/extensions/api_test/bluetooth_low_energy/create_service/runtest.js
|
| diff --git a/chrome/test/data/extensions/api_test/bluetooth_low_energy/create_service/runtest.js b/chrome/test/data/extensions/api_test/bluetooth_low_energy/create_service/runtest.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..386c37e2f1154c7515ccafb2125242d7d58a22fa
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/bluetooth_low_energy/create_service/runtest.js
|
| @@ -0,0 +1,18 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +function failOnError(result) {
|
| + if (chrome.runtime.lastError || !result) {
|
| + chrome.test.fail(chrome.runtime.lastError.message);
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +var service = { uuid: '00001234-0000-1000-8000-00805f9b34fb', isPrimary: true }
|
| +chrome.bluetoothLowEnergy.createService(service, function(result) {
|
| + if (failOnError(result))
|
| + return;
|
| + chrome.test.succeed();
|
| +});
|
|
|