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

Side by Side 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: Re-upload after 500's Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/browser.h" 8 #include "base/strings/string16.h"
9 9
10 class TaskManagerBrowserTestUtil { 10 namespace task_manager {
11 public: 11 namespace browsertest_util {
12 static void WaitForWebResourceChange(int target_count);
13 12
14 }; 13 // Runs the message loop, observing the task manager, until there are exactly
14 // |resource_count| many resources whose titles match the pattern
15 // |title_pattern|. The match is done via string_util's base::MatchPattern, so
16 // |title_pattern| may contain wildcards like "*".
17 //
18 // If the wait times out, this test will trigger a gtest failure. To get
19 // meaningful errors, tests should wrap invocations of this function with
20 // ASSERT_NO_FATAL_FAILURE().
21 void WaitForTaskManagerRows(int resource_count,
22 const base::string16& title_pattern);
23
24 } // namespace browsertest_util
25 } // namespace task_manager
15 26
16 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_ 27 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_BROWSERTEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698