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

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

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 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
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/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h"
8 #include "chrome/browser/profiles/profile_destroyer.h" 11 #include "chrome/browser/profiles/profile_destroyer.h"
9 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 13 #include "chrome/browser/ui/browser_navigator.h"
11 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
12 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
13 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
14 #include "content/public/browser/navigation_controller.h" 17 #include "content/public/browser/navigation_controller.h"
15 #include "content/public/browser/navigation_entry.h" 18 #include "content/public/browser/navigation_entry.h"
16 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
17 #include "content/public/test/test_renderer_host.h" 20 #include "content/public/test/test_renderer_host.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #if defined(OS_CHROMEOS) 113 #if defined(OS_CHROMEOS)
111 ash_test_helper_->TearDown(); 114 ash_test_helper_->TearDown();
112 #elif defined(USE_AURA) 115 #elif defined(USE_AURA)
113 aura_test_helper_->TearDown(); 116 aura_test_helper_->TearDown();
114 ui::TerminateContextFactoryForTests(); 117 ui::TerminateContextFactoryForTests();
115 #endif 118 #endif
116 testing::Test::TearDown(); 119 testing::Test::TearDown();
117 120
118 // A Task is leaked if we don't destroy everything, then run the message 121 // A Task is leaked if we don't destroy everything, then run the message
119 // loop. 122 // loop.
120 base::MessageLoop::current()->PostTask(FROM_HERE, 123 base::ThreadTaskRunnerHandle::Get()->PostTask(
121 base::MessageLoop::QuitClosure()); 124 FROM_HERE, base::MessageLoop::QuitClosure());
122 base::MessageLoop::current()->Run(); 125 base::MessageLoop::current()->Run();
123 126
124 #if defined(TOOLKIT_VIEWS) 127 #if defined(TOOLKIT_VIEWS)
125 constrained_window::SetConstrainedWindowViewsClient(nullptr); 128 constrained_window::SetConstrainedWindowViewsClient(nullptr);
126 views_delegate_.reset(NULL); 129 views_delegate_.reset(NULL);
127 #endif 130 #endif
128 } 131 }
129 132
130 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) { 133 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
131 chrome::NavigateParams params(browser, url, ui::PAGE_TRANSITION_TYPED); 134 chrome::NavigateParams params(browser, url, ui::PAGE_TRANSITION_TYPED);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 258
256 #if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS) 259 #if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
257 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() { 260 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
258 #if defined(USE_ASH) 261 #if defined(USE_ASH)
259 return new ash::test::AshTestViewsDelegate; 262 return new ash::test::AshTestViewsDelegate;
260 #else 263 #else
261 return new views::TestViewsDelegate; 264 return new views::TestViewsDelegate;
262 #endif 265 #endif
263 } 266 }
264 #endif 267 #endif
OLDNEW
« no previous file with comments | « chrome/service/service_utility_process_host.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698