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

Unified Diff: chrome/browser/task_manager/task_manager_browsertest_util.h

Issue 185873003: Task Manager: overhaul & re-enable task manager browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retry upload Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/task_manager/task_manager_browsertest_util.h
diff --git a/chrome/browser/task_manager/task_manager_browsertest_util.h b/chrome/browser/task_manager/task_manager_browsertest_util.h
index 92c09da6defdd9bc4488d181e76d527a920b233a..dc2336dbce099b3b694256a9e4612d9756be1894 100644
--- a/chrome/browser/task_manager/task_manager_browsertest_util.h
+++ b/chrome/browser/task_manager/task_manager_browsertest_util.h
@@ -5,12 +5,23 @@
#ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_
#define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_
-#include "chrome/browser/ui/browser.h"
+#include "base/strings/string16.h"
-class TaskManagerBrowserTestUtil {
- public:
- static void WaitForWebResourceChange(int target_count);
+namespace task_manager {
+namespace browsertest_util {
-};
+// Runs the message loop, observing the task manager, until there are exactly
+// |resource_count| many resources whose titles match the pattern
+// |title_pattern|. The match is done via string_util's base::MatchPattern, so
+// |title_pattern| may contain wildcards like "*".
+//
+// If the wait times out, this test will trigger a gtest failure. To get
+// meaningful errors, tests should wrap invocations of this function with
+// ASSERT_NO_FATAL_FAILURE().
+void WaitForTaskManagerRows(int resource_count,
+ const base::string16& title_pattern);
+
+} // namespace browsertest_util
+} // namespace task_manager
#endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_
« 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