OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 LOG(INFO) << "All ExtensionHosts loaded"; | 192 LOG(INFO) << "All ExtensionHosts loaded"; |
193 | 193 |
194 return true; | 194 return true; |
195 } | 195 } |
196 | 196 |
197 void ExtensionBrowserTest::Observe(NotificationType type, | 197 void ExtensionBrowserTest::Observe(NotificationType type, |
198 const NotificationSource& source, | 198 const NotificationSource& source, |
199 const NotificationDetails& details) { | 199 const NotificationDetails& details) { |
200 switch (type.value) { | 200 switch (type.value) { |
201 case NotificationType::EXTENSION_LOADED: | 201 case NotificationType::EXTENSION_LOADED: |
| 202 last_loaded_extension_id_ = Details<Extension>(details).ptr()->id(); |
202 std::cout << "Got EXTENSION_LOADED notification.\n"; | 203 std::cout << "Got EXTENSION_LOADED notification.\n"; |
203 MessageLoopForUI::current()->Quit(); | 204 MessageLoopForUI::current()->Quit(); |
204 break; | 205 break; |
205 | 206 |
206 case NotificationType::EXTENSION_UPDATE_DISABLED: | 207 case NotificationType::EXTENSION_UPDATE_DISABLED: |
207 std::cout << "Got EXTENSION_UPDATE_DISABLED notification.\n"; | 208 std::cout << "Got EXTENSION_UPDATE_DISABLED notification.\n"; |
208 MessageLoopForUI::current()->Quit(); | 209 MessageLoopForUI::current()->Quit(); |
209 break; | 210 break; |
210 | 211 |
211 case NotificationType::EXTENSION_HOST_DID_STOP_LOADING: | 212 case NotificationType::EXTENSION_HOST_DID_STOP_LOADING: |
212 std::cout << "Got EXTENSION_HOST_DID_STOP_LOADING notification.\n"; | 213 std::cout << "Got EXTENSION_HOST_DID_STOP_LOADING notification.\n"; |
213 MessageLoopForUI::current()->Quit(); | 214 MessageLoopForUI::current()->Quit(); |
214 break; | 215 break; |
215 | 216 |
216 default: | 217 default: |
217 NOTREACHED(); | 218 NOTREACHED(); |
218 break; | 219 break; |
219 } | 220 } |
220 } | 221 } |
OLD | NEW |