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

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « chrome/service/service_process.cc ('k') | chrome/test/base/in_process_browser_test.h » ('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 #include "chrome/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 ash_test_helper_->TearDown(); 98 ash_test_helper_->TearDown();
99 #elif defined(TOOLKIT_VIEWS) 99 #elif defined(TOOLKIT_VIEWS)
100 views_test_helper_.reset(); 100 views_test_helper_.reset();
101 #endif 101 #endif
102 102
103 testing::Test::TearDown(); 103 testing::Test::TearDown();
104 104
105 // A Task is leaked if we don't destroy everything, then run the message 105 // A Task is leaked if we don't destroy everything, then run the message
106 // loop. 106 // loop.
107 base::ThreadTaskRunnerHandle::Get()->PostTask( 107 base::ThreadTaskRunnerHandle::Get()->PostTask(
108 FROM_HERE, base::MessageLoop::QuitClosure()); 108 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
109 base::MessageLoop::current()->Run(); 109 base::MessageLoop::current()->Run();
110 } 110 }
111 111
112 gfx::NativeWindow BrowserWithTestWindowTest::GetContext() { 112 gfx::NativeWindow BrowserWithTestWindowTest::GetContext() {
113 #if defined(OS_CHROMEOS) 113 #if defined(OS_CHROMEOS)
114 return ash_test_helper_->CurrentContext(); 114 return ash_test_helper_->CurrentContext();
115 #elif defined(TOOLKIT_VIEWS) 115 #elif defined(TOOLKIT_VIEWS)
116 return views_test_helper_->GetContext(); 116 return views_test_helper_->GetContext();
117 #else 117 #else
118 return nullptr; 118 return nullptr;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 true /* trusted_source */, 237 true /* trusted_source */,
238 gfx::Rect(), 238 gfx::Rect(),
239 profile, 239 profile,
240 host_desktop_type); 240 host_desktop_type);
241 } else { 241 } else {
242 params.type = browser_type; 242 params.type = browser_type;
243 } 243 }
244 params.window = browser_window; 244 params.window = browser_window;
245 return new Browser(params); 245 return new Browser(params);
246 } 246 }
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698