| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 const int tabs_before = tab_strip->count(); | 476 const int tabs_before = tab_strip->count(); |
| 477 CrashExtension(first_extension_id_); | 477 CrashExtension(first_extension_id_); |
| 478 | 478 |
| 479 // Tab should still be open, and extension should be crashed. | 479 // Tab should still be open, and extension should be crashed. |
| 480 EXPECT_EQ(tabs_before, tab_strip->count()); | 480 EXPECT_EQ(tabs_before, tab_strip->count()); |
| 481 EXPECT_EQ(size_before, GetExtensionService()->extensions()->size()); | 481 EXPECT_EQ(size_before, GetExtensionService()->extensions()->size()); |
| 482 EXPECT_EQ(crash_size_before + 1, | 482 EXPECT_EQ(crash_size_before + 1, |
| 483 GetExtensionService()->terminated_extensions()->size()); | 483 GetExtensionService()->terminated_extensions()->size()); |
| 484 | 484 |
| 485 { | 485 { |
| 486 ui_test_utils::WindowedNotificationObserver observer( | 486 content::WindowedNotificationObserver observer( |
| 487 content::NOTIFICATION_LOAD_STOP, | 487 content::NOTIFICATION_LOAD_STOP, |
| 488 content::Source<NavigationController>( | 488 content::Source<NavigationController>( |
| 489 &chrome::GetActiveWebContents(browser())->GetController())); | 489 &chrome::GetActiveWebContents(browser())->GetController())); |
| 490 chrome::Reload(browser(), CURRENT_TAB); | 490 chrome::Reload(browser(), CURRENT_TAB); |
| 491 observer.Wait(); | 491 observer.Wait(); |
| 492 } | 492 } |
| 493 // Extension should now be loaded. | 493 // Extension should now be loaded. |
| 494 SCOPED_TRACE("after reloading the tab"); | 494 SCOPED_TRACE("after reloading the tab"); |
| 495 CheckExtensionConsistency(first_extension_id_); | 495 CheckExtensionConsistency(first_extension_id_); |
| 496 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); | 496 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); |
| 497 ASSERT_EQ(0U, CountBalloons()); | 497 ASSERT_EQ(0U, CountBalloons()); |
| 498 } | 498 } |
| OLD | NEW |