| 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/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/background/background_contents_service.h" | 10 #include "chrome/browser/background/background_contents_service.h" |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 467 |
| 468 // Kill the extension process and make sure we notice it. | 468 // Kill the extension process and make sure we notice it. |
| 469 TaskManager::GetInstance()->KillProcess(2); | 469 TaskManager::GetInstance()->KillProcess(2); |
| 470 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); | 470 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); |
| 471 | 471 |
| 472 // Reload the extension using the "crashed extension" infobar while the task | 472 // Reload the extension using the "crashed extension" infobar while the task |
| 473 // manager is still visible. Make sure we don't crash and the extension | 473 // manager is still visible. Make sure we don't crash and the extension |
| 474 // gets reloaded and noticed in the task manager. | 474 // gets reloaded and noticed in the task manager. |
| 475 InfoBarService* infobar_service = InfoBarService::FromWebContents( | 475 InfoBarService* infobar_service = InfoBarService::FromWebContents( |
| 476 browser()->tab_strip_model()->GetActiveWebContents()); | 476 browser()->tab_strip_model()->GetActiveWebContents()); |
| 477 ASSERT_EQ(1U, infobar_service->GetInfoBarCount()); | 477 ASSERT_EQ(1U, infobar_service->infobar_count()); |
| 478 ConfirmInfoBarDelegate* delegate = infobar_service-> | 478 ConfirmInfoBarDelegate* delegate = |
| 479 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); | 479 infobar_service->infobar_at(0)->AsConfirmInfoBarDelegate(); |
| 480 ASSERT_TRUE(delegate); | 480 ASSERT_TRUE(delegate); |
| 481 delegate->Accept(); | 481 delegate->Accept(); |
| 482 TaskManagerBrowserTestUtil::WaitForWebResourceChange(3); | 482 TaskManagerBrowserTestUtil::WaitForWebResourceChange(3); |
| 483 } | 483 } |
| 484 | 484 |
| 485 #if defined(OS_WIN) | 485 #if defined(OS_WIN) |
| 486 // http://crbug.com/93158. | 486 // http://crbug.com/93158. |
| 487 #define MAYBE_ReloadExtension DISABLED_ReloadExtension | 487 #define MAYBE_ReloadExtension DISABLED_ReloadExtension |
| 488 #else | 488 #else |
| 489 #define MAYBE_ReloadExtension ReloadExtension | 489 #define MAYBE_ReloadExtension ReloadExtension |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 // Check that we get some value for the cache columns. | 542 // Check that we get some value for the cache columns. |
| 543 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), | 543 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), |
| 544 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 544 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 545 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), | 545 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), |
| 546 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 546 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 547 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), | 547 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), |
| 548 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 548 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 549 } | 549 } |
| 550 | 550 |
| 551 #endif | 551 #endif |
| OLD | NEW |