| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 class TaskManagerBrowserTest : public ExtensionBrowserTest { | 61 class TaskManagerBrowserTest : public ExtensionBrowserTest { |
| 62 public: | 62 public: |
| 63 TaskManagerModel* model() const { | 63 TaskManagerModel* model() const { |
| 64 return TaskManager::GetInstance()->model(); | 64 return TaskManager::GetInstance()->model(); |
| 65 } | 65 } |
| 66 protected: | 66 protected: |
| 67 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 67 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 68 ExtensionBrowserTest::SetUpCommandLine(command_line); | 68 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 69 | 69 |
| 70 // Do not prelaunch the GPU process for these tests because it will show | 70 // Do not prelaunch the GPU process and disable accelerated compositing |
| 71 // up in task manager but whether it appears before or after the new tab | 71 // for these tests as the GPU process will show up in task manager but |
| 72 // renderer process is not well defined. | 72 // whether it appears before or after the new tab renderer process is not |
| 73 // well defined. |
| 73 command_line->AppendSwitch(switches::kDisableGpuProcessPrelaunch); | 74 command_line->AppendSwitch(switches::kDisableGpuProcessPrelaunch); |
| 75 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
| 74 } | 76 } |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 #if defined(OS_MACOSX) || defined(OS_LINUX) | 79 #if defined(OS_MACOSX) || defined(OS_LINUX) |
| 78 #define MAYBE_ShutdownWhileOpen DISABLED_ShutdownWhileOpen | 80 #define MAYBE_ShutdownWhileOpen DISABLED_ShutdownWhileOpen |
| 79 #else | 81 #else |
| 80 #define MAYBE_ShutdownWhileOpen ShutdownWhileOpen | 82 #define MAYBE_ShutdownWhileOpen ShutdownWhileOpen |
| 81 #endif | 83 #endif |
| 82 | 84 |
| 83 // Regression test for http://crbug.com/13361 | 85 // Regression test for http://crbug.com/13361 |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); | 555 TaskManagerBrowserTestUtil::WaitForWebResourceChange(2); |
| 554 | 556 |
| 555 // Check that we get some value for the cache columns. | 557 // Check that we get some value for the cache columns. |
| 556 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), | 558 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(resource_count), |
| 557 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 559 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 558 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), | 560 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(resource_count), |
| 559 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 561 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 560 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), | 562 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(resource_count), |
| 561 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); | 563 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); |
| 562 } | 564 } |
| OLD | NEW |