Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: chrome/browser/task_management/task_manager_browsertest_util.h

Issue 2178733002: Task manager should support Idle Wakeups on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build error on win_clang Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // These "task_management::browsertest_util" functions allow you to wait for a 5 // These "task_management::browsertest_util" functions allow you to wait for a
6 // task manager to show a particular state, enabling tests of the form "do 6 // task manager to show a particular state, enabling tests of the form "do
7 // something that ought to create a process, then wait for that process to show 7 // something that ought to create a process, then wait for that process to show
8 // up in the Task Manager." They are intended to abstract away the details of 8 // up in the Task Manager." They are intended to abstract away the details of
9 // the platform's TaskManager UI. 9 // the platform's TaskManager UI.
10 10
11 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_BROWSERTEST_UTIL_H_ 11 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_BROWSERTEST_UTIL_H_
12 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_BROWSERTEST_UTIL_H_ 12 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_BROWSERTEST_UTIL_H_
13 13
14 #include <stddef.h> 14 #include <stddef.h>
15 15
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 17
18 namespace task_management { 18 namespace task_management {
19 namespace browsertest_util { 19 namespace browsertest_util {
20 20
21 // Specifies some integer-valued column of numeric data reported by the task 21 // Specifies some integer-valued column of numeric data reported by the task
22 // manager model. Please add more here as needed by tests. 22 // manager model. Please add more here as needed by tests.
23 enum class ColumnSpecifier { 23 enum class ColumnSpecifier {
24 V8_MEMORY, 24 V8_MEMORY,
25 V8_MEMORY_USED, 25 V8_MEMORY_USED,
26 SQLITE_MEMORY_USED, 26 SQLITE_MEMORY_USED,
27 IDLE_WAKEUPS,
27 28
28 COLUMN_NONE, // Default value. 29 COLUMN_NONE, // Default value.
29 }; 30 };
30 31
31 // Runs the message loop, observing the task manager, until there are exactly 32 // Runs the message loop, observing the task manager, until there are exactly
32 // |resource_count| many resources whose titles match the pattern 33 // |resource_count| many resources whose titles match the pattern
33 // |title_pattern|. The match is done via string_util's base::MatchPattern, so 34 // |title_pattern|. The match is done via string_util's base::MatchPattern, so
34 // |title_pattern| may contain wildcards like "*". 35 // |title_pattern| may contain wildcards like "*".
35 // 36 //
36 // If the wait times out, this test will trigger a gtest failure. To get 37 // If the wait times out, this test will trigger a gtest failure. To get
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 base::string16 MatchSubframe(const char* title); // "Subframe: " + title 71 base::string16 MatchSubframe(const char* title); // "Subframe: " + title
71 base::string16 MatchAnySubframe(); // "Subframe: *" 72 base::string16 MatchAnySubframe(); // "Subframe: *"
72 // "Utility: " + title 73 // "Utility: " + title
73 base::string16 MatchUtility(const base::string16& title); 74 base::string16 MatchUtility(const base::string16& title);
74 base::string16 MatchAnyUtility(); // "Utility: *" 75 base::string16 MatchAnyUtility(); // "Utility: *"
75 76
76 } // namespace browsertest_util 77 } // namespace browsertest_util
77 } // namespace task_management 78 } // namespace task_management
78 79
79 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_BROWSERTEST_UTIL_H_ 80 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_BROWSERTEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698