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

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

Issue 2905403002: plumb network upload into the task manager (Closed)
Patch Set: fixed comments Created 3 years, 6 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_manager::browsertest_util" functions allow you to wait for a 5 // These "task_manager::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_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ 11 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_
12 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ 12 #define CHROME_BROWSER_TASK_MANAGER_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_manager { 18 namespace task_manager {
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 IDLE_WAKEUPS,
28 MEMORY_STATE, 28 MEMORY_STATE,
29 NETWORK_USE,
30 TOTAL_NETWORK_USE,
29 31
30 COLUMN_NONE, // Default value. 32 COLUMN_NONE, // Default value.
31 }; 33 };
32 34
33 // Runs the message loop, observing the task manager, until there are exactly 35 // Runs the message loop, observing the task manager, until there are exactly
34 // |resource_count| many resources whose titles match the pattern 36 // |resource_count| many resources whose titles match the pattern
35 // |title_pattern|. The match is done via string_util's base::MatchPattern, so 37 // |title_pattern|. The match is done via string_util's base::MatchPattern, so
36 // |title_pattern| may contain wildcards like "*". 38 // |title_pattern| may contain wildcards like "*".
37 // 39 //
38 // If the wait times out, this test will trigger a gtest failure. To get 40 // 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
72 base::string16 MatchSubframe(const char* title); // "Subframe: " + title 74 base::string16 MatchSubframe(const char* title); // "Subframe: " + title
73 base::string16 MatchAnySubframe(); // "Subframe: *" 75 base::string16 MatchAnySubframe(); // "Subframe: *"
74 // "Utility: " + title 76 // "Utility: " + title
75 base::string16 MatchUtility(const base::string16& title); 77 base::string16 MatchUtility(const base::string16& title);
76 base::string16 MatchAnyUtility(); // "Utility: *" 78 base::string16 MatchAnyUtility(); // "Utility: *"
77 79
78 } // namespace browsertest_util 80 } // namespace browsertest_util
79 } // namespace task_manager 81 } // namespace task_manager
80 82
81 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ 83 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | chrome/browser/task_manager/task_manager_browsertest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698