| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 virtual void SetUpOnMainThread() OVERRIDE { | 74 virtual void SetUpOnMainThread() OVERRIDE { |
| 75 ExtensionBrowserTest::SetUpOnMainThread(); | 75 ExtensionBrowserTest::SetUpOnMainThread(); |
| 76 | 76 |
| 77 EXPECT_EQ(0, model()->ResourceCount()); | 77 EXPECT_EQ(0, model()->ResourceCount()); |
| 78 | 78 |
| 79 EXPECT_EQ(0, TaskManager::GetBackgroundPageCount()); | 79 EXPECT_EQ(0, TaskManager::GetBackgroundPageCount()); |
| 80 | 80 |
| 81 // Show the task manager. This populates the model, and helps with debugging | 81 // Show the task manager. This populates the model, and helps with debugging |
| 82 // (you see the task manager). | 82 // (you see the task manager). |
| 83 browser()->window()->ShowTaskManager(chrome::HOST_DESKTOP_TYPE_NATIVE); | 83 browser()->window()->ShowTaskManager(); |
| 84 | 84 |
| 85 // New Tab Page. | 85 // New Tab Page. |
| 86 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); | 86 TaskManagerBrowserTestUtil::WaitForWebResourceChange(1); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void Refresh() { | 89 void Refresh() { |
| 90 model()->Refresh(); | 90 model()->Refresh(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 protected: | 93 protected: |
| (...skipping 448 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 |