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 "chrome/test/base/in_process_browser_test.h" | 5 #include "chrome/test/base/in_process_browser_test.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 FilePath()); | 278 FilePath()); |
279 | 279 |
280 const extensions::Extension* extension = InstallExtension(path_v1_, 1); | 280 const extensions::Extension* extension = InstallExtension(path_v1_, 1); |
281 | 281 |
282 std::vector<ExtensionBasicInfo> extension_infos; | 282 std::vector<ExtensionBasicInfo> extension_infos; |
283 extension_infos.push_back(ExtensionBasicInfo(extension)); | 283 extension_infos.push_back(ExtensionBasicInfo(extension)); |
284 | 284 |
285 ExtensionService* extension_service = | 285 ExtensionService* extension_service = |
286 browser()->profile()->GetExtensionService(); | 286 browser()->profile()->GetExtensionService(); |
287 | 287 |
288 CrxInstaller* crx_installer = NULL; | 288 extensions::CrxInstaller* crx_installer = NULL; |
289 | 289 |
290 // Create an observer to wait for the update to finish. | 290 // Create an observer to wait for the update to finish. |
291 content::WindowedNotificationObserver windowed_observer( | 291 content::WindowedNotificationObserver windowed_observer( |
292 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 292 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
293 content::Source<CrxInstaller>(crx_installer)); | 293 content::Source<extensions::CrxInstaller>(crx_installer)); |
294 ASSERT_TRUE(extension_service-> | 294 ASSERT_TRUE(extension_service-> |
295 UpdateExtension(extension->id(), path_v2_, GURL(), &crx_installer)); | 295 UpdateExtension(extension->id(), path_v2_, GURL(), &crx_installer)); |
296 windowed_observer.Wait(); | 296 windowed_observer.Wait(); |
297 | 297 |
298 extension = extension_service->GetExtensionById( | 298 extension = extension_service->GetExtensionById( |
299 extension_infos[0].id, false); // don't include disabled extensions. | 299 extension_infos[0].id, false); // don't include disabled extensions. |
300 | 300 |
301 // The total series of events for this process will be: | 301 // The total series of events for this process will be: |
302 // Extension Install - install version 1 | 302 // Extension Install - install version 1 |
303 // Extension Install - install version 2 | 303 // Extension Install - install version 2 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 DISABLED_RendererCrashEvent) { | 414 DISABLED_RendererCrashEvent) { |
415 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUICrashURL)); | 415 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUICrashURL)); |
416 | 416 |
417 std::vector<linked_ptr<Event> > events = GetEvents(); | 417 std::vector<linked_ptr<Event> > events = GetEvents(); |
418 ASSERT_EQ(1u, events.size()); | 418 ASSERT_EQ(1u, events.size()); |
419 | 419 |
420 CheckEventType(EVENT_RENDERER_CRASH, events[0]); | 420 CheckEventType(EVENT_RENDERER_CRASH, events[0]); |
421 } | 421 } |
422 | 422 |
423 } // namespace performance_monitor | 423 } // namespace performance_monitor |
OLD | NEW |