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 namespace task_manager { | 12 namespace task_manager { |
13 namespace browsertest_util { | 13 namespace browsertest_util { |
14 | 14 |
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 | 15 // Runs the message loop, observing the task manager, until there are exactly |
20 // |resource_count| many resources whose titles match the pattern | 16 // |resource_count| many resources whose titles match the pattern |
21 // |title_pattern|. The match is done via string_util's base::MatchPattern, so | 17 // |title_pattern|. The match is done via string_util's base::MatchPattern, so |
22 // |title_pattern| may contain wildcards like "*". | 18 // |title_pattern| may contain wildcards like "*". |
23 // | 19 // |
24 // If the wait times out, this test will trigger a gtest failure. To get | 20 // 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 | 21 // meaningful errors, tests should wrap invocations of this function with |
26 // ASSERT_NO_FATAL_FAILURE(). | 22 // ASSERT_NO_FATAL_FAILURE(). |
27 void WaitForTaskManagerRows(int resource_count, | 23 void WaitForTaskManagerRows(int resource_count, |
28 const base::string16& title_pattern); | 24 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 | 61 base::string16 MatchSubframe(const char* title); // "Subframe: " + title |
66 base::string16 MatchAnySubframe(); // "Subframe: *" | 62 base::string16 MatchAnySubframe(); // "Subframe: *" |
67 // "Utility: " + title | 63 // "Utility: " + title |
68 base::string16 MatchUtility(const base::string16& title); | 64 base::string16 MatchUtility(const base::string16& title); |
69 base::string16 MatchAnyUtility(); // "Utility: *" | 65 base::string16 MatchAnyUtility(); // "Utility: *" |
70 | 66 |
71 } // namespace browsertest_util | 67 } // namespace browsertest_util |
72 } // namespace task_manager | 68 } // namespace task_manager |
73 | 69 |
74 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ | 70 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ |
OLD | NEW |