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