| Index: extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
|
| diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_private_apitest.cc b/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
|
| similarity index 89%
|
| rename from chrome/browser/extensions/api/bluetooth/bluetooth_private_apitest.cc
|
| rename to extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
|
| index 8a03ef620f69de102eb97716125e2e9e8412b94b..186462f1ac6ce9efd7c02010b7208f7ae19da79d 100644
|
| --- a/chrome/browser/extensions/api/bluetooth/bluetooth_private_apitest.cc
|
| +++ b/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
|
| @@ -5,13 +5,13 @@
|
| #include "base/command_line.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h"
|
| -#include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h"
|
| #include "chrome/browser/extensions/extension_apitest.h"
|
| -#include "chrome/common/extensions/api/bluetooth_private.h"
|
| #include "device/bluetooth/test/mock_bluetooth_adapter.h"
|
| #include "device/bluetooth/test/mock_bluetooth_device.h"
|
| +#include "extensions/browser/api/bluetooth/bluetooth_api.h"
|
| +#include "extensions/browser/api/bluetooth/bluetooth_event_router.h"
|
| #include "extensions/browser/event_router.h"
|
| +#include "extensions/common/api/bluetooth_private.h"
|
| #include "extensions/common/switches.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| @@ -25,8 +25,10 @@ using testing::ReturnPointee;
|
| using testing::WithArgs;
|
| using testing::WithoutArgs;
|
|
|
| -namespace bt = extensions::api::bluetooth;
|
| -namespace bt_private = extensions::api::bluetooth_private;
|
| +namespace bt = extensions::core_api::bluetooth;
|
| +namespace bt_private = extensions::core_api::bluetooth_private;
|
| +
|
| +namespace extensions {
|
|
|
| namespace {
|
|
|
| @@ -46,7 +48,7 @@ class BluetoothPrivateApiTest : public ExtensionApiTest {
|
|
|
| virtual void SetUpOnMainThread() OVERRIDE {
|
| CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
| - extensions::switches::kWhitelistedExtensionID, kTestExtensionId);
|
| + switches::kWhitelistedExtensionID, kTestExtensionId);
|
| mock_adapter_ = new NiceMock<MockBluetoothAdapter>();
|
| event_router()->SetAdapterForTest(mock_adapter_.get());
|
| mock_device_.reset(new NiceMock<MockBluetoothDevice>(mock_adapter_.get(),
|
| @@ -62,9 +64,8 @@ class BluetoothPrivateApiTest : public ExtensionApiTest {
|
|
|
| virtual void TearDownOnMainThread() OVERRIDE {}
|
|
|
| - extensions::BluetoothEventRouter* event_router() {
|
| - return extensions::BluetoothAPI::Get(browser()->profile())
|
| - ->event_router();
|
| + BluetoothEventRouter* event_router() {
|
| + return BluetoothAPI::Get(browser()->profile())->event_router();
|
| }
|
|
|
| void SetName(const std::string& name, const base::Closure& callback) {
|
| @@ -92,10 +93,10 @@ class BluetoothPrivateApiTest : public ExtensionApiTest {
|
|
|
| scoped_ptr<base::ListValue> args =
|
| bt_private::OnPairing::Create(pairing_event);
|
| - scoped_ptr<extensions::Event> event(
|
| - new extensions::Event(bt_private::OnPairing::kEventName, args.Pass()));
|
| - extensions::EventRouter::Get(browser()->profile())
|
| - ->DispatchEventToExtension(kTestExtensionId, event.Pass());
|
| + scoped_ptr<Event> event(
|
| + new Event(bt_private::OnPairing::kEventName, args.Pass()));
|
| + EventRouter::Get(browser()->profile())->DispatchEventToExtension(
|
| + kTestExtensionId, event.Pass());
|
| }
|
|
|
| void DispatchAuthorizePairingEvent() {
|
| @@ -181,3 +182,5 @@ IN_PROC_BROWSER_TEST_F(BluetoothPrivateApiTest, PasskeyPairing) {
|
| ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing"))
|
| << message_;
|
| }
|
| +
|
| +} // namespace extensions
|
|
|