Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Side by Side Diff: chrome/browser/extensions/api/bluetooth/bluetooth_private_apitest.cc

Issue 246603008: Expose device RSSI and Tx power via the chrome.bluetooth API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h" 8 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h"
9 #include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h" 9 #include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 EXPECT_CALL(*mock_adapter_, 169 EXPECT_CALL(*mock_adapter_,
170 AddPairingDelegate( 170 AddPairingDelegate(
171 _, device::BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_HIGH)) 171 _, device::BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_HIGH))
172 .WillOnce(WithoutArgs( 172 .WillOnce(WithoutArgs(
173 Invoke(this, &BluetoothPrivateApiTest::DispatchPasskeyPairingEvent))); 173 Invoke(this, &BluetoothPrivateApiTest::DispatchPasskeyPairingEvent)));
174 EXPECT_CALL(*mock_device_, ExpectingPasskey()).WillRepeatedly(Return(true)); 174 EXPECT_CALL(*mock_device_, ExpectingPasskey()).WillRepeatedly(Return(true));
175 EXPECT_CALL(*mock_device_, SetPasskey(900531)); 175 EXPECT_CALL(*mock_device_, SetPasskey(900531));
176 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing")) 176 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing"))
177 << message_; 177 << message_;
178 } 178 }
179
180 IN_PROC_BROWSER_TEST_F(BluetoothPrivateApiTest, GetRSSIForDevice) {
181 EXPECT_CALL(*mock_device_, GetRSSI()).WillOnce(Return(-42));
182 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/get_rssi"))
183 << message_;
184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698