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

Side by Side Diff: chrome/browser/ui/cocoa/run_loop_testing.h

Issue 2565813002: Create c/b/ui/cocoa/test and move test files to there (Closed)
Patch Set: Rebase Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_RUN_LOOP_TESTING_H_
6 #define CHROME_BROWSER_UI_COCOA_RUN_LOOP_TESTING_H_
7
8 namespace chrome {
9 namespace testing {
10
11 // A common pattern in Chromium is to get a selector to execute on the next
12 // iteration of the outermost run loop, done like so:
13 //
14 // [someObj performSelector:@selector(someSel:) withObject:nil afterDelay:0];
15 //
16 // This is used when performing the work will negatively affect something
17 // currently on the stack. Unfortunately this also affects the testability of
18 // objects that do this. A call to this function will pump work like this from
19 // the event queue and run it until all such work, as of the time of calling
20 // this, has been processed.
21 //
22 // Note that this is not a NSApplication-based loop, and so things like NSEvents
23 // are *not* pumped from the event queue.
24 void NSRunLoopRunAllPending();
25
26 } // namespace testing
27 } // namespace chrome
28
29 #endif // CHROME_BROWSER_UI_COCOA_RUN_LOOP_TESTING_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm ('k') | chrome/browser/ui/cocoa/run_loop_testing.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698