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

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

Issue 1762883002: Disable window occlusion APIs when running browser tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <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
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
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
OLDNEW
« content/public/common/content_switches.h ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698