OLD | NEW |
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); | 152 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |
153 | 153 |
154 command_line->AppendSwitch(switches::kDomAutomationController); | 154 command_line->AppendSwitch(switches::kDomAutomationController); |
155 | 155 |
156 // It is sometimes useful when looking at browser test failures to know which | 156 // It is sometimes useful when looking at browser test failures to know which |
157 // GPU blacklisting decisions were made. | 157 // GPU blacklisting decisions were made. |
158 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); | 158 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); |
159 | 159 |
160 if (use_software_compositing_) { | 160 if (use_software_compositing_) { |
161 command_line->AppendSwitch(switches::kDisableGpu); | 161 command_line->AppendSwitch(switches::kDisableGpu); |
162 command_line->AppendSwitch(switches::kEnableSoftwareCompositing); | |
163 #if defined(USE_AURA) | 162 #if defined(USE_AURA) |
164 command_line->AppendSwitch(switches::kUIDisableThreadedCompositing); | 163 command_line->AppendSwitch(switches::kUIDisableThreadedCompositing); |
165 #endif | 164 #endif |
166 } | 165 } |
167 | 166 |
168 #if defined(USE_AURA) | 167 #if defined(USE_AURA) |
169 // Most tests do not need pixel output, so we don't produce any. The command | 168 // Most tests do not need pixel output, so we don't produce any. The command |
170 // line can override this behaviour to allow for visual debugging. | 169 // line can override this behaviour to allow for visual debugging. |
171 if (command_line->HasSwitch(switches::kEnablePixelOutputInTests)) | 170 if (command_line->HasSwitch(switches::kEnablePixelOutputInTests)) |
172 enable_pixel_output_ = true; | 171 enable_pixel_output_ = true; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 use_software_compositing_ = true; | 298 use_software_compositing_ = true; |
300 } | 299 } |
301 | 300 |
302 bool BrowserTestBase::UsingOSMesa() const { | 301 bool BrowserTestBase::UsingOSMesa() const { |
303 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 302 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
304 return cmd->GetSwitchValueASCII(switches::kUseGL) == | 303 return cmd->GetSwitchValueASCII(switches::kUseGL) == |
305 gfx::kGLImplementationOSMesaName; | 304 gfx::kGLImplementationOSMesaName; |
306 } | 305 } |
307 | 306 |
308 } // namespace content | 307 } // namespace content |
OLD | NEW |