| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 ASSERT_TRUE(first_tab); | 116 ASSERT_TRUE(first_tab); |
| 117 chrome::CloseWebContents(browser(), first_tab); | 117 chrome::CloseWebContents(browser(), first_tab); |
| 118 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); | 118 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); |
| 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 // Fails everywhere, see http://crbug.com/151010. | 126 #define MAYBE_NoticePanelChanges NoticePanelChanges |
| 127 #define MAYBE_NoticePanelChanges FAILS_NoticePanelChanges | |
| 128 #endif | 127 #endif |
| 129 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_NoticePanelChanges) { | 128 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_NoticePanelChanges) { |
| 130 EXPECT_EQ(0, model()->ResourceCount()); | 129 EXPECT_EQ(0, model()->ResourceCount()); |
| 131 | 130 |
| 132 // 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 |
| 133 // (you see the task manager). | 132 // (you see the task manager). |
| 134 browser()->window()->ShowTaskManager(); | 133 browser()->window()->ShowTaskManager(); |
| 135 | 134 |
| 136 // New Tab Page. | 135 // New Tab Page. |
| 137 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); | 136 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); | 553 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); |
| 555 | 554 |
| 556 // Check that we get some value for the cache columns. | 555 // Check that we get some value for the cache columns. |
| 557 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), | 556 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), |
| 558 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 557 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 559 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), | 558 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), |
| 560 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 559 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 561 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), | 560 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), |
| 562 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 561 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 563 } | 562 } |
| OLD | NEW |