| 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 "chrome/browser/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
| 10 #include "chrome/browser/background/background_contents_service.h" | 10 #include "chrome/browser/background/background_contents_service.h" |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 | 449 |
| 450 // Kill the extension process and make sure we notice it. | 450 // Kill the extension process and make sure we notice it. |
| 451 TaskManager::GetInstance()->KillProcess(2); | 451 TaskManager::GetInstance()->KillProcess(2); |
| 452 TaskManagerBrowserTestUtil::WaitForResourceChange(2); | 452 TaskManagerBrowserTestUtil::WaitForResourceChange(2); |
| 453 | 453 |
| 454 // Reload the extension using the "crashed extension" infobar while the task | 454 // Reload the extension using the "crashed extension" infobar while the task |
| 455 // manager is still visible. Make sure we don't crash and the extension | 455 // manager is still visible. Make sure we don't crash and the extension |
| 456 // gets reloaded and noticed in the task manager. | 456 // gets reloaded and noticed in the task manager. |
| 457 InfoBarTabHelper* infobar_helper = | 457 InfoBarTabHelper* infobar_helper = |
| 458 chrome::GetActiveTabContents(browser())->infobar_tab_helper(); | 458 chrome::GetActiveTabContents(browser())->infobar_tab_helper(); |
| 459 ASSERT_EQ(1U, infobar_helper->infobar_count()); | 459 ASSERT_EQ(1U, infobar_helper->GetInfoBarCount()); |
| 460 ConfirmInfoBarDelegate* delegate = infobar_helper-> | 460 ConfirmInfoBarDelegate* delegate = infobar_helper-> |
| 461 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); | 461 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); |
| 462 ASSERT_TRUE(delegate); | 462 ASSERT_TRUE(delegate); |
| 463 delegate->Accept(); | 463 delegate->Accept(); |
| 464 TaskManagerBrowserTestUtil::WaitForResourceChange(3); | 464 TaskManagerBrowserTestUtil::WaitForResourceChange(3); |
| 465 } | 465 } |
| 466 | 466 |
| 467 #if defined(OS_WIN) | 467 #if defined(OS_WIN) |
| 468 // http://crbug.com/93158. | 468 // http://crbug.com/93158. |
| 469 #define MAYBE_ReloadExtension DISABLED_ReloadExtension | 469 #define MAYBE_ReloadExtension DISABLED_ReloadExtension |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 TaskManagerBrowserTestUtil::WaitForResourceChange(3); | 533 TaskManagerBrowserTestUtil::WaitForResourceChange(3); |
| 534 | 534 |
| 535 // Check that we get some value for the cache columns. | 535 // Check that we get some value for the cache columns. |
| 536 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(2), | 536 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(2), |
| 537 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 537 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 538 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(2), | 538 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(2), |
| 539 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 539 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 540 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(2), | 540 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(2), |
| 541 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 541 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 542 } | 542 } |
| OLD | NEW |