Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 | 193 |
| 194 command_line->AppendSwitch(switches::kDomAutomationController); | 194 command_line->AppendSwitch(switches::kDomAutomationController); |
| 195 | 195 |
| 196 // It is sometimes useful when looking at browser test failures to know which | 196 // It is sometimes useful when looking at browser test failures to know which |
| 197 // GPU blacklisting decisions were made. | 197 // GPU blacklisting decisions were made. |
| 198 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); | 198 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); |
| 199 | 199 |
| 200 if (use_software_compositing_) | 200 if (use_software_compositing_) |
| 201 command_line->AppendSwitch(switches::kDisableGpu); | 201 command_line->AppendSwitch(switches::kDisableGpu); |
| 202 | 202 |
| 203 // The layout of windows on screen is unpredictable during, so disable | |
|
Noel Gordon
2016/03/04 01:57:32
"during" -> "during tests" ?
ccameron
2016/03/06 23:09:08
Thanks -- fixed.
| |
| 204 // occlusion when running browser tests. | |
| 205 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 206 switches::kDisableBackgroundingOccludedWindows); | |
| 207 | |
| 203 #if defined(USE_AURA) | 208 #if defined(USE_AURA) |
| 204 // Most tests do not need pixel output, so we don't produce any. The command | 209 // Most tests do not need pixel output, so we don't produce any. The command |
| 205 // line can override this behaviour to allow for visual debugging. | 210 // line can override this behaviour to allow for visual debugging. |
| 206 if (command_line->HasSwitch(switches::kEnablePixelOutputInTests)) | 211 if (command_line->HasSwitch(switches::kEnablePixelOutputInTests)) |
| 207 enable_pixel_output_ = true; | 212 enable_pixel_output_ = true; |
| 208 | 213 |
| 209 if (command_line->HasSwitch(switches::kDisableGLDrawingForTests)) { | 214 if (command_line->HasSwitch(switches::kDisableGLDrawingForTests)) { |
| 210 NOTREACHED() << "kDisableGLDrawingForTests should not be used as it" | 215 NOTREACHED() << "kDisableGLDrawingForTests should not be used as it" |
| 211 "is chosen by tests. Use kEnablePixelOutputInTests " | 216 "is chosen by tests. Use kEnablePixelOutputInTests " |
| 212 "to enable pixel output."; | 217 "to enable pixel output."; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 356 use_software_compositing_ = true; | 361 use_software_compositing_ = true; |
| 357 } | 362 } |
| 358 | 363 |
| 359 bool BrowserTestBase::UsingOSMesa() const { | 364 bool BrowserTestBase::UsingOSMesa() const { |
| 360 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 365 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 361 return cmd->GetSwitchValueASCII(switches::kUseGL) == | 366 return cmd->GetSwitchValueASCII(switches::kUseGL) == |
| 362 gfx::kGLImplementationOSMesaName; | 367 gfx::kGLImplementationOSMesaName; |
| 363 } | 368 } |
| 364 | 369 |
| 365 } // namespace content | 370 } // namespace content |
| OLD | NEW |