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

Side by Side Diff: content/public/test/test_utils.h

Issue 17084007: Revert "GTTF: Remove message loop hooks from TestLauncherDelegate" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/test_launcher.h ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_TEST_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_UTILS_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 16 matching lines...) Expand all
27 class RenderViewHost; 27 class RenderViewHost;
28 28
29 // Turns on nestable tasks, runs the message loop, then resets nestable tasks 29 // Turns on nestable tasks, runs the message loop, then resets nestable tasks
30 // to what they were originally. Prefer this over MessageLoop::Run for in 30 // to what they were originally. Prefer this over MessageLoop::Run for in
31 // process browser tests that need to block until a condition is met. 31 // process browser tests that need to block until a condition is met.
32 void RunMessageLoop(); 32 void RunMessageLoop();
33 33
34 // Variant of RunMessageLoop that takes RunLoop. 34 // Variant of RunMessageLoop that takes RunLoop.
35 void RunThisRunLoop(base::RunLoop* run_loop); 35 void RunThisRunLoop(base::RunLoop* run_loop);
36 36
37 // Adds pre/post hooks to call when running a message loop.
38 // DEPRECATED: Please do not use in new code.
39 // TODO(phajdan.jr): Remove message loop hooks after switch to Aura.
40 typedef base::Callback<void(base::RunLoop*)> RunMessageLoopHook;
41 void AddPreRunMessageLoopHook(const RunMessageLoopHook& hook);
42 void AddPostRunMessageLoopHook(const RunMessageLoopHook& hook);
43
44 // Turns on nestable tasks, runs all pending tasks in the message loop, 37 // Turns on nestable tasks, runs all pending tasks in the message loop,
45 // then resets nestable tasks to what they were originally. Prefer this 38 // then resets nestable tasks to what they were originally. Prefer this
46 // over MessageLoop::RunAllPending for in process browser tests to run 39 // over MessageLoop::RunAllPending for in process browser tests to run
47 // all pending tasks. 40 // all pending tasks.
48 void RunAllPendingInMessageLoop(); 41 void RunAllPendingInMessageLoop();
49 42
50 // Blocks the current thread until all the pending messages in the loop of the 43 // Blocks the current thread until all the pending messages in the loop of the
51 // thread |thread_id| have been processed. 44 // thread |thread_id| have been processed.
52 void RunAllPendingInMessageLoop(BrowserThread::ID thread_id); 45 void RunAllPendingInMessageLoop(BrowserThread::ID thread_id);
53 46
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 NotificationSource source_; 165 NotificationSource source_;
173 NotificationDetails details_; 166 NotificationDetails details_;
174 scoped_refptr<MessageLoopRunner> message_loop_runner_; 167 scoped_refptr<MessageLoopRunner> message_loop_runner_;
175 168
176 DISALLOW_COPY_AND_ASSIGN(WindowedNotificationObserver); 169 DISALLOW_COPY_AND_ASSIGN(WindowedNotificationObserver);
177 }; 170 };
178 171
179 } // namespace content 172 } // namespace content
180 173
181 #endif // CONTENT_PUBLIC_TEST_TEST_UTILS_H_ 174 #endif // CONTENT_PUBLIC_TEST_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/public/test/test_launcher.h ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698