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

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

Issue 1815563004: Remove iOS ifdefs in src/content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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
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 #include "content/public/test/test_utils.h" 5 #include "content/public/test/test_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 RunThisRunLoop(&run_loop); 122 RunThisRunLoop(&run_loop);
123 } 123 }
124 124
125 void RunThisRunLoop(base::RunLoop* run_loop) { 125 void RunThisRunLoop(base::RunLoop* run_loop) {
126 base::MessageLoop::ScopedNestableTaskAllower allow( 126 base::MessageLoop::ScopedNestableTaskAllower allow(
127 base::MessageLoop::current()); 127 base::MessageLoop::current());
128 128
129 // If we're running inside a browser test, we might need to allow the test 129 // If we're running inside a browser test, we might need to allow the test
130 // launcher to do extra work before/after running a nested message loop. 130 // launcher to do extra work before/after running a nested message loop.
131 TestLauncherDelegate* delegate = NULL; 131 TestLauncherDelegate* delegate = NULL;
132 #if !defined(OS_IOS)
133 delegate = GetCurrentTestLauncherDelegate(); 132 delegate = GetCurrentTestLauncherDelegate();
134 #endif
135 if (delegate) 133 if (delegate)
136 delegate->PreRunMessageLoop(run_loop); 134 delegate->PreRunMessageLoop(run_loop);
137 run_loop->Run(); 135 run_loop->Run();
138 if (delegate) 136 if (delegate)
139 delegate->PostRunMessageLoop(); 137 delegate->PostRunMessageLoop();
140 } 138 }
141 139
142 void RunAllPendingInMessageLoop() { 140 void RunAllPendingInMessageLoop() {
143 base::RunLoop run_loop; 141 base::RunLoop run_loop;
144 base::ThreadTaskRunnerHandle::Get()->PostTask( 142 base::ThreadTaskRunnerHandle::Get()->PostTask(
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 380
383 void WebContentsDestroyedWatcher::Wait() { 381 void WebContentsDestroyedWatcher::Wait() {
384 message_loop_runner_->Run(); 382 message_loop_runner_->Run();
385 } 383 }
386 384
387 void WebContentsDestroyedWatcher::WebContentsDestroyed() { 385 void WebContentsDestroyedWatcher::WebContentsDestroyed() {
388 message_loop_runner_->Quit(); 386 message_loop_runner_->Quit();
389 } 387 }
390 388
391 } // namespace content 389 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_content_client_initializer.cc ('k') | content/public/test/unittest_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698