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

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

Issue 245443004: Set the override redirect in browser_tests on aura/x11 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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"
(...skipping 22 matching lines...) Expand all
33 #endif 33 #endif
34 34
35 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
36 #include "base/threading/thread_restrictions.h" 36 #include "base/threading/thread_restrictions.h"
37 #include "content/public/browser/browser_main_runner.h" 37 #include "content/public/browser/browser_main_runner.h"
38 #include "content/public/browser/browser_thread.h" 38 #include "content/public/browser/browser_thread.h"
39 #endif 39 #endif
40 40
41 #if defined(USE_AURA) 41 #if defined(USE_AURA)
42 #include "content/browser/compositor/image_transport_factory.h" 42 #include "content/browser/compositor/image_transport_factory.h"
43 #if defined(USE_X11)
44 #include "ui/aura/window_tree_host_x11.h"
45 #endif
43 #endif 46 #endif
44 47
45 namespace content { 48 namespace content {
46 namespace { 49 namespace {
47 50
48 #if defined(OS_POSIX) 51 #if defined(OS_POSIX)
49 // On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make 52 // On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make
50 // debugging easier) and also exit with a known error code (so that the test 53 // debugging easier) and also exit with a known error code (so that the test
51 // framework considers this a failure -- http://crbug.com/57578). 54 // framework considers this a failure -- http://crbug.com/57578).
52 // Note: We only want to do this in the browser process, and not forked 55 // Note: We only want to do this in the browser process, and not forked
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } // namespace 121 } // namespace
119 122
120 extern int BrowserMain(const MainFunctionParams&); 123 extern int BrowserMain(const MainFunctionParams&);
121 124
122 BrowserTestBase::BrowserTestBase() 125 BrowserTestBase::BrowserTestBase()
123 : enable_pixel_output_(false), use_software_compositing_(false) { 126 : enable_pixel_output_(false), use_software_compositing_(false) {
124 #if defined(OS_MACOSX) 127 #if defined(OS_MACOSX)
125 base::mac::SetOverrideAmIBundled(true); 128 base::mac::SetOverrideAmIBundled(true);
126 #endif 129 #endif
127 130
131 #if defined(USE_AURA) && defined(USE_X11)
132 aura::test::SetUseOverrideRedirectWindowByDefault(true);
133 #endif
134
128 #if defined(OS_POSIX) 135 #if defined(OS_POSIX)
129 handle_sigterm_ = true; 136 handle_sigterm_ = true;
130 #endif 137 #endif
131 138
132 // This is called through base::TestSuite initially. It'll also be called 139 // This is called through base::TestSuite initially. It'll also be called
133 // inside BrowserMain, so tell the code to ignore the check that it's being 140 // inside BrowserMain, so tell the code to ignore the check that it's being
134 // called more than once 141 // called more than once
135 base::i18n::AllowMultipleInitializeCallsForTesting(); 142 base::i18n::AllowMultipleInitializeCallsForTesting();
136 143
137 embedded_test_server_.reset(new net::test_server::EmbeddedTestServer); 144 embedded_test_server_.reset(new net::test_server::EmbeddedTestServer);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 use_software_compositing_ = true; 305 use_software_compositing_ = true;
299 } 306 }
300 307
301 bool BrowserTestBase::UsingOSMesa() const { 308 bool BrowserTestBase::UsingOSMesa() const {
302 CommandLine* cmd = CommandLine::ForCurrentProcess(); 309 CommandLine* cmd = CommandLine::ForCurrentProcess();
303 return cmd->GetSwitchValueASCII(switches::kUseGL) == 310 return cmd->GetSwitchValueASCII(switches::kUseGL) ==
304 gfx::kGLImplementationOSMesaName; 311 gfx::kGLImplementationOSMesaName;
305 } 312 }
306 313
307 } // namespace content 314 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698