| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.h" | 5 #include "chrome/browser/task_manager.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 extension = model()->GetResourceExtension(2); | 227 extension = model()->GetResourceExtension(2); |
| 228 | 228 |
| 229 ReloadExtension(extension->id()); | 229 ReloadExtension(extension->id()); |
| 230 WaitForResourceChange(3); | 230 WaitForResourceChange(3); |
| 231 extension = model()->GetResourceExtension(2); | 231 extension = model()->GetResourceExtension(2); |
| 232 | 232 |
| 233 ReloadExtension(extension->id()); | 233 ReloadExtension(extension->id()); |
| 234 WaitForResourceChange(3); | 234 WaitForResourceChange(3); |
| 235 } | 235 } |
| 236 | 236 |
| 237 // Crashy, http://crbug.com/42301. | 237 // Flaky, http://crbug.com/42301. |
| 238 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, | 238 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, |
| 239 DISABLED_PopulateWebCacheFields) { | 239 FLAKY_PopulateWebCacheFields) { |
| 240 EXPECT_EQ(0, model()->ResourceCount()); | 240 EXPECT_EQ(0, model()->ResourceCount()); |
| 241 | 241 |
| 242 // Show the task manager. This populates the model, and helps with debugging | 242 // Show the task manager. This populates the model, and helps with debugging |
| 243 // (you see the task manager). | 243 // (you see the task manager). |
| 244 browser()->window()->ShowTaskManager(); | 244 browser()->window()->ShowTaskManager(); |
| 245 | 245 |
| 246 // Browser and the New Tab Page. | 246 // Browser and the New Tab Page. |
| 247 EXPECT_EQ(2, model()->ResourceCount()); | 247 EXPECT_EQ(2, model()->ResourceCount()); |
| 248 | 248 |
| 249 // Open a new tab and make sure we notice that. | 249 // Open a new tab and make sure we notice that. |
| 250 GURL url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory), | 250 GURL url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory), |
| 251 FilePath(kTitle1File))); | 251 FilePath(kTitle1File))); |
| 252 browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, 0, | 252 browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, 0, |
| 253 TabStripModel::ADD_SELECTED, NULL, std::string(), | 253 TabStripModel::ADD_SELECTED, NULL, std::string(), |
| 254 NULL); | 254 NULL); |
| 255 WaitForResourceChange(3); | 255 WaitForResourceChange(3); |
| 256 | 256 |
| 257 // Check that we get some value for the cache columns. | 257 // Check that we get some value for the cache columns. |
| 258 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(2), | 258 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(2), |
| 259 l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 259 l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 260 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(2), | 260 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(2), |
| 261 l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 261 l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 262 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(2), | 262 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(2), |
| 263 l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 263 l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 264 } | 264 } |
| OLD | NEW |