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

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

Issue 1170623003: Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2011 The Chromium Authors. All rights reserved. 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 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/browser_test_base.h" 5 #include "content/public/test/browser_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
11 #include "base/location.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/single_thread_task_runner.h"
13 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
14 #include "base/sys_info.h" 13 #include "base/sys_info.h"
15 #include "base/test/test_timeouts.h" 14 #include "base/test/test_timeouts.h"
16 #include "content/browser/renderer_host/render_process_host_impl.h" 15 #include "content/browser/renderer_host/render_process_host_impl.h"
17 #include "content/browser/tracing/tracing_controller_impl.h" 16 #include "content/browser/tracing/tracing_controller_impl.h"
18 #include "content/public/app/content_main.h" 17 #include "content/public/app/content_main.h"
19 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
20 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
21 #include "content/public/common/main_function_params.h" 20 #include "content/public/common/main_function_params.h"
22 #include "content/public/test/test_launcher.h" 21 #include "content/public/test/test_launcher.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 const base::Closure& task) { 328 const base::Closure& task) {
330 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 329 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
331 switches::kSingleProcess)); 330 switches::kSingleProcess));
332 331
333 scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner; 332 scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner;
334 333
335 base::MessageLoop* renderer_loop = 334 base::MessageLoop* renderer_loop =
336 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); 335 RenderProcessHostImpl::GetInProcessRendererThreadForTesting();
337 CHECK(renderer_loop); 336 CHECK(renderer_loop);
338 337
339 renderer_loop->task_runner()->PostTask( 338 renderer_loop->PostTask(
340 FROM_HERE, 339 FROM_HERE,
341 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); 340 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure()));
342 runner->Run(); 341 runner->Run();
343 } 342 }
344 343
345 void BrowserTestBase::EnablePixelOutput() { enable_pixel_output_ = true; } 344 void BrowserTestBase::EnablePixelOutput() { enable_pixel_output_ = true; }
346 345
347 void BrowserTestBase::UseSoftwareCompositing() { 346 void BrowserTestBase::UseSoftwareCompositing() {
348 use_software_compositing_ = true; 347 use_software_compositing_ = true;
349 } 348 }
350 349
351 bool BrowserTestBase::UsingOSMesa() const { 350 bool BrowserTestBase::UsingOSMesa() const {
352 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 351 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
353 return cmd->GetSwitchValueASCII(switches::kUseGL) == 352 return cmd->GetSwitchValueASCII(switches::kUseGL) ==
354 gfx::kGLImplementationOSMesaName; 353 gfx::kGLImplementationOSMesaName;
355 } 354 }
356 355
357 } // namespace content 356 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_thread.h ('k') | content/public/test/fake_speech_recognition_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698