| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 fake_event_router_.reset(new FakeEventRouter(profile_)); | 68 fake_event_router_.reset(new FakeEventRouter(profile_)); |
| 69 return fake_event_router_.get(); | 69 return fake_event_router_.get(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 scoped_ptr<FakeEventRouter> fake_event_router_; | 73 scoped_ptr<FakeEventRouter> fake_event_router_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(FakeExtensionSystem); | 75 DISALLOW_COPY_AND_ASSIGN(FakeExtensionSystem); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 BrowserContextKeyedService* BuildFakeExtensionSystem( | 78 KeyedService* BuildFakeExtensionSystem(content::BrowserContext* profile) { |
| 79 content::BrowserContext* profile) { | |
| 80 return new FakeExtensionSystem(static_cast<Profile*>(profile)); | 79 return new FakeExtensionSystem(static_cast<Profile*>(profile)); |
| 81 } | 80 } |
| 82 | 81 |
| 83 } // namespace | 82 } // namespace |
| 84 | 83 |
| 85 namespace extensions { | 84 namespace extensions { |
| 86 | 85 |
| 87 namespace bluetooth = api::bluetooth; | 86 namespace bluetooth = api::bluetooth; |
| 88 | 87 |
| 89 class ExtensionBluetoothEventRouterTest : public testing::Test { | 88 class ExtensionBluetoothEventRouterTest : public testing::Test { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 &mock_device, | 244 &mock_device, |
| 246 mock_socket); | 245 mock_socket); |
| 247 FakeEventRouter* fake_event_router = | 246 FakeEventRouter* fake_event_router = |
| 248 static_cast<FakeEventRouter*>(fake_extension_system->event_router()); | 247 static_cast<FakeEventRouter*>(fake_extension_system->event_router()); |
| 249 EXPECT_TRUE(fake_event_router->event() == NULL); | 248 EXPECT_TRUE(fake_event_router->event() == NULL); |
| 250 | 249 |
| 251 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); | 250 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); |
| 252 } | 251 } |
| 253 | 252 |
| 254 } // namespace extensions | 253 } // namespace extensions |
| OLD | NEW |