| 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); | 534 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); |
| 535 ASSERT_EQ(crash_size_before + 1, | 535 ASSERT_EQ(crash_size_before + 1, |
| 536 GetExtensionService()->terminated_extensions()->size()); | 536 GetExtensionService()->terminated_extensions()->size()); |
| 537 | 537 |
| 538 GetExtensionService()->UnloadAllExtensions(); | 538 GetExtensionService()->UnloadAllExtensions(); |
| 539 ASSERT_EQ(crash_size_before, | 539 ASSERT_EQ(crash_size_before, |
| 540 GetExtensionService()->terminated_extensions()->size()); | 540 GetExtensionService()->terminated_extensions()->size()); |
| 541 } | 541 } |
| 542 | 542 |
| 543 // Disabled on aura as flakey: http://crbug.com/169622 | 543 // Disabled on aura as flakey: http://crbug.com/169622 |
| 544 // Failing on Windows after Blink roll: http://crbug.com/232340 | 544 #if defined(USE_AURA) |
| 545 #if defined(USE_AURA) || defined(OS_WIN) | |
| 546 #define MAYBE_ReloadTabsWithBackgroundPage DISABLED_ReloadTabsWithBackgroundPage | 545 #define MAYBE_ReloadTabsWithBackgroundPage DISABLED_ReloadTabsWithBackgroundPage |
| 547 #else | 546 #else |
| 548 #define MAYBE_ReloadTabsWithBackgroundPage ReloadTabsWithBackgroundPage | 547 #define MAYBE_ReloadTabsWithBackgroundPage ReloadTabsWithBackgroundPage |
| 549 #endif | 548 #endif |
| 550 | 549 |
| 551 // Test that when an extension with a background page that has a tab open | 550 // Test that when an extension with a background page that has a tab open |
| 552 // crashes, the tab stays open, and reloading it reloads the extension. | 551 // crashes, the tab stays open, and reloading it reloads the extension. |
| 553 // Regression test for issue 71629. | 552 // Regression test for issue 71629. |
| 554 IN_PROC_BROWSER_TEST_F(MAYBE_ExtensionCrashRecoveryTest, | 553 IN_PROC_BROWSER_TEST_F(MAYBE_ExtensionCrashRecoveryTest, |
| 555 MAYBE_ReloadTabsWithBackgroundPage) { | 554 MAYBE_ReloadTabsWithBackgroundPage) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 582 GetController())); | 581 GetController())); |
| 583 chrome::Reload(browser(), CURRENT_TAB); | 582 chrome::Reload(browser(), CURRENT_TAB); |
| 584 observer.Wait(); | 583 observer.Wait(); |
| 585 } | 584 } |
| 586 // Extension should now be loaded. | 585 // Extension should now be loaded. |
| 587 SCOPED_TRACE("after reloading the tab"); | 586 SCOPED_TRACE("after reloading the tab"); |
| 588 CheckExtensionConsistency(first_extension_id_); | 587 CheckExtensionConsistency(first_extension_id_); |
| 589 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); | 588 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); |
| 590 ASSERT_EQ(0U, CountBalloons()); | 589 ASSERT_EQ(0U, CountBalloons()); |
| 591 } | 590 } |
| OLD | NEW |