| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 EXPECT_TRUE(router_.HasProfile(kHealthProfileUuid)); | 169 EXPECT_TRUE(router_.HasProfile(kHealthProfileUuid)); |
| 170 | 170 |
| 171 // Unloading the extension should unregister all profiles added by it. | 171 // Unloading the extension should unregister all profiles added by it. |
| 172 EXPECT_CALL(mock_audio_profile_, Unregister()).Times(1); | 172 EXPECT_CALL(mock_audio_profile_, Unregister()).Times(1); |
| 173 EXPECT_CALL(mock_health_profile_, Unregister()).Times(1); | 173 EXPECT_CALL(mock_health_profile_, Unregister()).Times(1); |
| 174 | 174 |
| 175 content::NotificationService* notifier = | 175 content::NotificationService* notifier = |
| 176 content::NotificationService::current(); | 176 content::NotificationService::current(); |
| 177 UnloadedExtensionInfo details( | 177 UnloadedExtensionInfo details( |
| 178 extension, UnloadedExtensionInfo::REASON_DISABLE); | 178 extension, UnloadedExtensionInfo::REASON_DISABLE); |
| 179 notifier->Notify(chrome::NOTIFICATION_EXTENSION_UNLOADED, | 179 notifier->Notify(chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, |
| 180 content::Source<Profile>(test_profile_.get()), | 180 content::Source<Profile>(test_profile_.get()), |
| 181 content::Details<UnloadedExtensionInfo>(&details)); | 181 content::Details<UnloadedExtensionInfo>(&details)); |
| 182 | 182 |
| 183 EXPECT_FALSE(router_.HasProfile(kAudioProfileUuid)); | 183 EXPECT_FALSE(router_.HasProfile(kAudioProfileUuid)); |
| 184 EXPECT_FALSE(router_.HasProfile(kHealthProfileUuid)); | 184 EXPECT_FALSE(router_.HasProfile(kHealthProfileUuid)); |
| 185 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); | 185 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); |
| 186 } | 186 } |
| 187 | 187 |
| 188 TEST_F(ExtensionBluetoothEventRouterTest, DispatchConnectionEvent) { | 188 TEST_F(ExtensionBluetoothEventRouterTest, DispatchConnectionEvent) { |
| 189 router_.AddProfile( | 189 router_.AddProfile( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 &mock_device, | 244 &mock_device, |
| 245 mock_socket); | 245 mock_socket); |
| 246 FakeEventRouter* fake_event_router = | 246 FakeEventRouter* fake_event_router = |
| 247 static_cast<FakeEventRouter*>(fake_extension_system->event_router()); | 247 static_cast<FakeEventRouter*>(fake_extension_system->event_router()); |
| 248 EXPECT_TRUE(fake_event_router->event() == NULL); | 248 EXPECT_TRUE(fake_event_router->event() == NULL); |
| 249 | 249 |
| 250 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); | 250 EXPECT_CALL(*mock_adapter_, RemoveObserver(testing::_)).Times(1); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace extensions | 253 } // namespace extensions |
| OLD | NEW |