| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/process_util.h" | 5 #include "base/process_util.h" |
| 6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
| 7 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.h" |
| 8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
| 9 #include "chrome/browser/extensions/extension_process_manager.h" | 9 #include "chrome/browser/extensions/extension_process_manager.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/notifications/balloon_host.h" | 11 #include "chrome/browser/notifications/balloon_host.h" |
| 12 #include "chrome/browser/notifications/notification.h" | 12 #include "chrome/browser/notifications/notification.h" |
| 13 #include "chrome/browser/notifications/notification_delegate.h" | 13 #include "chrome/browser/notifications/notification_delegate.h" |
| 14 #include "chrome/browser/notifications/notification_ui_manager.h" | 14 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/tabs/tab_strip_model.h" | 16 #include "chrome/browser/tabs/tab_strip_model.h" |
| 17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
| 19 #include "content/browser/renderer_host/render_process_host.h" | 19 #include "content/browser/renderer_host/render_process_host.h" |
| 20 #include "content/browser/renderer_host/render_view_host.h" | 20 #include "content/browser/renderer_host/render_view_host.h" |
| 21 #include "content/browser/tab_contents/tab_contents.h" | 21 #include "content/browser/tab_contents/tab_contents.h" |
| 22 #include "content/common/result_codes.h" | 22 #include "content/public/common/result_codes.h" |
| 23 | 23 |
| 24 class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { | 24 class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { |
| 25 protected: | 25 protected: |
| 26 ExtensionService* GetExtensionService() { | 26 ExtensionService* GetExtensionService() { |
| 27 return browser()->profile()->GetExtensionService(); | 27 return browser()->profile()->GetExtensionService(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 ExtensionProcessManager* GetExtensionProcessManager() { | 30 ExtensionProcessManager* GetExtensionProcessManager() { |
| 31 return browser()->profile()->GetExtensionProcessManager(); | 31 return browser()->profile()->GetExtensionProcessManager(); |
| 32 } | 32 } |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 LoadSecondExtension(); | 444 LoadSecondExtension(); |
| 445 CrashExtension(size_before); | 445 CrashExtension(size_before); |
| 446 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); | 446 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); |
| 447 ASSERT_EQ(crash_size_before + 1, | 447 ASSERT_EQ(crash_size_before + 1, |
| 448 GetExtensionService()->terminated_extensions()->size()); | 448 GetExtensionService()->terminated_extensions()->size()); |
| 449 | 449 |
| 450 GetExtensionService()->UnloadAllExtensions(); | 450 GetExtensionService()->UnloadAllExtensions(); |
| 451 ASSERT_EQ(crash_size_before, | 451 ASSERT_EQ(crash_size_before, |
| 452 GetExtensionService()->terminated_extensions()->size()); | 452 GetExtensionService()->terminated_extensions()->size()); |
| 453 } | 453 } |
| OLD | NEW |