| 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 "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" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 using content::NavigationController; | 34 using content::NavigationController; |
| 35 using content::WebContents; | 35 using content::WebContents; |
| 36 using extensions::Extension; | 36 using extensions::Extension; |
| 37 | 37 |
| 38 // Tests are timing out waiting for extension to crash. | 38 // Tests are timing out waiting for extension to crash. |
| 39 // http://crbug.com/174705 | 39 // http://crbug.com/174705 |
| 40 #if defined(OS_MACOSX) || defined(USE_AURA) | 40 #if defined(OS_MACOSX) || defined(USE_AURA) |
| 41 #define MAYBE_ExtensionCrashRecoveryTest DISABLED_ExtensionCrashRecoveryTest | 41 #define MAYBE_ExtensionCrashRecoveryTest DISABLED_ExtensionCrashRecoveryTest |
| 42 #else | 42 #else |
| 43 #define MAYBE_ExtensionCrashRecoveryTest ExtensionCrashRecoveryTest | 43 #define MAYBE_ExtensionCrashRecoveryTest ExtensionCrashRecoveryTest |
| 44 #endif // defined(OS_MAC) || defined(USE_AURA) | 44 #endif // defined(OS_MACOSX) || defined(USE_AURA) |
| 45 | 45 |
| 46 class ExtensionCrashRecoveryTestBase : public ExtensionBrowserTest { | 46 class ExtensionCrashRecoveryTestBase : public ExtensionBrowserTest { |
| 47 protected: | 47 protected: |
| 48 virtual void AcceptNotification(size_t index) = 0; | 48 virtual void AcceptNotification(size_t index) = 0; |
| 49 virtual void CancelNotification(size_t index) = 0; | 49 virtual void CancelNotification(size_t index) = 0; |
| 50 virtual size_t CountBalloons() = 0; | 50 virtual size_t CountBalloons() = 0; |
| 51 | 51 |
| 52 ExtensionService* GetExtensionService() { | 52 ExtensionService* GetExtensionService() { |
| 53 return browser()->profile()->GetExtensionService(); | 53 return browser()->profile()->GetExtensionService(); |
| 54 } | 54 } |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 GetController())); | 573 GetController())); |
| 574 chrome::Reload(browser(), CURRENT_TAB); | 574 chrome::Reload(browser(), CURRENT_TAB); |
| 575 observer.Wait(); | 575 observer.Wait(); |
| 576 } | 576 } |
| 577 // Extension should now be loaded. | 577 // Extension should now be loaded. |
| 578 SCOPED_TRACE("after reloading the tab"); | 578 SCOPED_TRACE("after reloading the tab"); |
| 579 CheckExtensionConsistency(first_extension_id_); | 579 CheckExtensionConsistency(first_extension_id_); |
| 580 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); | 580 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); |
| 581 ASSERT_EQ(0U, CountBalloons()); | 581 ASSERT_EQ(0U, CountBalloons()); |
| 582 } | 582 } |
| OLD | NEW |