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

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

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/service/service_process_prefs_unittest.cc ('k') | chrome/test/base/testing_profile.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 #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/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #elif defined(TOOLKIT_VIEWS) 92 #elif defined(TOOLKIT_VIEWS)
93 views_test_helper_.reset(); 93 views_test_helper_.reset();
94 #endif 94 #endif
95 95
96 testing::Test::TearDown(); 96 testing::Test::TearDown();
97 97
98 // A Task is leaked if we don't destroy everything, then run the message 98 // A Task is leaked if we don't destroy everything, then run the message
99 // loop. 99 // loop.
100 base::ThreadTaskRunnerHandle::Get()->PostTask( 100 base::ThreadTaskRunnerHandle::Get()->PostTask(
101 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); 101 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
102 base::MessageLoop::current()->Run(); 102 base::RunLoop().Run();
103 } 103 }
104 104
105 gfx::NativeWindow BrowserWithTestWindowTest::GetContext() { 105 gfx::NativeWindow BrowserWithTestWindowTest::GetContext() {
106 #if defined(OS_CHROMEOS) 106 #if defined(OS_CHROMEOS)
107 return ash_test_helper_->CurrentContext(); 107 return ash_test_helper_->CurrentContext();
108 #elif defined(TOOLKIT_VIEWS) 108 #elif defined(TOOLKIT_VIEWS)
109 return views_test_helper_->GetContext(); 109 return views_test_helper_->GetContext();
110 #else 110 #else
111 return nullptr; 111 return nullptr;
112 #endif 112 #endif
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 Browser::CreateParams params(profile); 226 Browser::CreateParams params(profile);
227 if (hosted_app) { 227 if (hosted_app) {
228 params = Browser::CreateParams::CreateForApp( 228 params = Browser::CreateParams::CreateForApp(
229 "Test", true /* trusted_source */, gfx::Rect(), profile); 229 "Test", true /* trusted_source */, gfx::Rect(), profile);
230 } else { 230 } else {
231 params.type = browser_type; 231 params.type = browser_type;
232 } 232 }
233 params.window = browser_window; 233 params.window = browser_window;
234 return new Browser(params); 234 return new Browser(params);
235 } 235 }
OLDNEW
« no previous file with comments | « chrome/service/service_process_prefs_unittest.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698