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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 for (int i = 0; i < model()->ResourceCount(); ++i) { | 113 for (int i = 0; i < model()->ResourceCount(); ++i) { |
114 if (title == model()->GetResourceTitle(i)) | 114 if (title == model()->GetResourceTitle(i)) |
115 return i; | 115 return i; |
116 } | 116 } |
117 return -1; | 117 return -1; |
118 } | 118 } |
119 | 119 |
120 protected: | 120 protected: |
121 void SetUpCommandLine(base::CommandLine* command_line) override { | 121 void SetUpCommandLine(base::CommandLine* command_line) override { |
122 ExtensionBrowserTest::SetUpCommandLine(command_line); | 122 ExtensionBrowserTest::SetUpCommandLine(command_line); |
123 | |
124 // These tests are for the old implementation of the task manager. We must | |
125 // explicitly disable the new one. | |
126 task_manager::browsertest_util::EnableOldTaskManager(); | |
127 | |
128 // Do not launch device discovery process. | 123 // Do not launch device discovery process. |
129 command_line->AppendSwitch(switches::kDisableDeviceDiscoveryNotifications); | 124 command_line->AppendSwitch(switches::kDisableDeviceDiscoveryNotifications); |
130 } | 125 } |
131 | 126 |
132 private: | 127 private: |
133 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserTest); | 128 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserTest); |
134 }; | 129 }; |
135 | 130 |
136 class TaskManagerUtilityProcessBrowserTest : public TaskManagerBrowserTest { | 131 class TaskManagerUtilityProcessBrowserTest : public TaskManagerBrowserTest { |
137 public: | 132 public: |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 WaitForTaskManagerRows(1, MatchTab("Title Of Awesomeness"))); | 1215 WaitForTaskManagerRows(1, MatchTab("Title Of Awesomeness"))); |
1221 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe())); | 1216 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe())); |
1222 | 1217 |
1223 HideTaskManager(); | 1218 HideTaskManager(); |
1224 ShowTaskManager(); | 1219 ShowTaskManager(); |
1225 | 1220 |
1226 ASSERT_NO_FATAL_FAILURE( | 1221 ASSERT_NO_FATAL_FAILURE( |
1227 WaitForTaskManagerRows(1, MatchTab("Title Of Awesomeness"))); | 1222 WaitForTaskManagerRows(1, MatchTab("Title Of Awesomeness"))); |
1228 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe())); | 1223 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe())); |
1229 } | 1224 } |
OLD | NEW |