| 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/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/api/infobars/confirm_infobar_delegate.h" | 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 #if defined(USE_ASH) | 121 #if defined(USE_ASH) |
| 122 // This test fails on Ash because task manager treats view type | 122 // This test fails on Ash because task manager treats view type |
| 123 // Panels differently for Ash. | 123 // Panels differently for Ash. |
| 124 #define MAYBE_NoticePanelChanges FAILS_NoticePanelChanges | 124 #define MAYBE_NoticePanelChanges FAILS_NoticePanelChanges |
| 125 #else | 125 #else |
| 126 #define MAYBE_NoticePanelChanges NoticePanelChanges | 126 #define MAYBE_NoticePanelChanges NoticePanelChanges |
| 127 #endif | 127 #endif |
| 128 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_NoticePanelChanges) { | 128 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_NoticePanelChanges) { |
| 129 if (!PanelManager::UseBrowserlessPanels()) | |
| 130 return; | |
| 131 | |
| 132 EXPECT_EQ(0, model()->ResourceCount()); | 129 EXPECT_EQ(0, model()->ResourceCount()); |
| 133 | 130 |
| 134 // Show the task manager. This populates the model, and helps with debugging | 131 // Show the task manager. This populates the model, and helps with debugging |
| 135 // (you see the task manager). | 132 // (you see the task manager). |
| 136 browser()->window()->ShowTaskManager(); | 133 browser()->window()->ShowTaskManager(); |
| 137 | 134 |
| 138 // New Tab Page. | 135 // New Tab Page. |
| 139 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); | 136 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); |
| 140 | 137 |
| 141 ASSERT_TRUE(LoadExtension( | 138 ASSERT_TRUE(LoadExtension( |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); | 553 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); |
| 557 | 554 |
| 558 // Check that we get some value for the cache columns. | 555 // Check that we get some value for the cache columns. |
| 559 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), | 556 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), |
| 560 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 557 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 561 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), | 558 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), |
| 562 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 559 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 563 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), | 560 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), |
| 564 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 561 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 565 } | 562 } |
| OLD | NEW |