Index: chrome/test/data/extensions/api_test/bluetooth_private/get_rssi/test.js |
diff --git a/chrome/test/data/extensions/api_test/bluetooth_private/get_rssi/test.js b/chrome/test/data/extensions/api_test/bluetooth_private/get_rssi/test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..128dda3f439de6aa6c5350a39c3f4e6b8bb42996 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/bluetooth_private/get_rssi/test.js |
@@ -0,0 +1,20 @@ |
+// Copyright 2014 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 testGetDeviceRSSI() { |
+ chrome.bluetoothPrivate.getDeviceRSSI('11:12:13:14:15:16', function(rssi) { |
+ chrome.test.assertNoLastError(); |
+ chrome.test.assertEq(-42, rssi); |
+ chrome.test.succeed(); |
+ }); |
+} |
+ |
+function testGetUnknownDeviceRSSI() { |
+ chrome.bluetoothPrivate.getDeviceRSSI( |
+ '11:11:11:11:11:11', |
+ chrome.test.callbackFail( |
+ 'Given address is not a valid Bluetooth device.')); |
+} |
+ |
+chrome.test.runTests([testGetDeviceRSSI, testGetUnknownDeviceRSSI]); |