OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ |
6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 | 11 |
| 12 // ----------------------------------------------------------------------------- |
| 13 // DEPRECATED: |
| 14 // - This is currently enabled only on MacOSX, and will be removed soon (See |
| 15 // crbug.com/528486). |
| 16 // - Please don't add any new stuff here. See the new implementation in |
| 17 // //src/chrome/browser/task_management. |
| 18 // ----------------------------------------------------------------------------- |
| 19 #if !defined(OS_MACOSX) |
| 20 #error "The old task manager is deprecated on non-macos platforms." |
| 21 #endif // defined(OS_MACOSX) |
| 22 |
12 namespace task_manager { | 23 namespace task_manager { |
13 namespace browsertest_util { | 24 namespace browsertest_util { |
14 | 25 |
15 // For the old task manager browser tests, we must call this to disable the | |
16 // use of the new implementation and revert back to the old one. | |
17 void EnableOldTaskManager(); | |
18 | |
19 // Runs the message loop, observing the task manager, until there are exactly | 26 // Runs the message loop, observing the task manager, until there are exactly |
20 // |resource_count| many resources whose titles match the pattern | 27 // |resource_count| many resources whose titles match the pattern |
21 // |title_pattern|. The match is done via string_util's base::MatchPattern, so | 28 // |title_pattern|. The match is done via string_util's base::MatchPattern, so |
22 // |title_pattern| may contain wildcards like "*". | 29 // |title_pattern| may contain wildcards like "*". |
23 // | 30 // |
24 // If the wait times out, this test will trigger a gtest failure. To get | 31 // If the wait times out, this test will trigger a gtest failure. To get |
25 // meaningful errors, tests should wrap invocations of this function with | 32 // meaningful errors, tests should wrap invocations of this function with |
26 // ASSERT_NO_FATAL_FAILURE(). | 33 // ASSERT_NO_FATAL_FAILURE(). |
27 void WaitForTaskManagerRows(int resource_count, | 34 void WaitForTaskManagerRows(int resource_count, |
28 const base::string16& title_pattern); | 35 const base::string16& title_pattern); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 base::string16 MatchSubframe(const char* title); // "Subframe: " + title | 72 base::string16 MatchSubframe(const char* title); // "Subframe: " + title |
66 base::string16 MatchAnySubframe(); // "Subframe: *" | 73 base::string16 MatchAnySubframe(); // "Subframe: *" |
67 // "Utility: " + title | 74 // "Utility: " + title |
68 base::string16 MatchUtility(const base::string16& title); | 75 base::string16 MatchUtility(const base::string16& title); |
69 base::string16 MatchAnyUtility(); // "Utility: *" | 76 base::string16 MatchAnyUtility(); // "Utility: *" |
70 | 77 |
71 } // namespace browsertest_util | 78 } // namespace browsertest_util |
72 } // namespace task_manager | 79 } // namespace task_manager |
73 | 80 |
74 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ | 81 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ |
OLD | NEW |