| 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.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 fake_event_router_.reset(new FakeEventRouter(profile_)); | 63 fake_event_router_.reset(new FakeEventRouter(profile_)); |
| 64 return fake_event_router_.get(); | 64 return fake_event_router_.get(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 scoped_ptr<FakeEventRouter> fake_event_router_; | 68 scoped_ptr<FakeEventRouter> fake_event_router_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(FakeExtensionSystem); | 70 DISALLOW_COPY_AND_ASSIGN(FakeExtensionSystem); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 ProfileKeyedService* BuildFakeExtensionSystem( | 73 BrowserContextKeyedService* BuildFakeExtensionSystem( |
| 74 content::BrowserContext* profile) { | 74 content::BrowserContext* profile) { |
| 75 return new FakeExtensionSystem(static_cast<Profile*>(profile)); | 75 return new FakeExtensionSystem(static_cast<Profile*>(profile)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace | 78 } // namespace |
| 79 | 79 |
| 80 namespace extensions { | 80 namespace extensions { |
| 81 | 81 |
| 82 class ExtensionBluetoothEventRouterTest : public testing::Test { | 82 class ExtensionBluetoothEventRouterTest : public testing::Test { |
| 83 public: | 83 public: |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 &mock_device, | 202 &mock_device, |
| 203 mock_socket); | 203 mock_socket); |
| 204 FakeEventRouter* fake_event_router = | 204 FakeEventRouter* fake_event_router = |
| 205 static_cast<FakeEventRouter*>(fake_extension_system->event_router()); | 205 static_cast<FakeEventRouter*>(fake_extension_system->event_router()); |
| 206 EXPECT_TRUE(fake_event_router->event() == NULL); | 206 EXPECT_TRUE(fake_event_router->event() == NULL); |
| 207 | 207 |
| 208 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); | 208 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace extensions | 211 } // namespace extensions |
| OLD | NEW |