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

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

Issue 23703017: Enable GPU control lists in tests on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r228383 Created 7 years, 2 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
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/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 void BrowserTestBase::SetUp() { 148 void BrowserTestBase::SetUp() {
149 CommandLine* command_line = CommandLine::ForCurrentProcess(); 149 CommandLine* command_line = CommandLine::ForCurrentProcess();
150 150
151 // The tests assume that file:// URIs can freely access other file:// URIs. 151 // The tests assume that file:// URIs can freely access other file:// URIs.
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 command_line->AppendSwitch(switches::kSkipGpuDataLoading); 156 // It is sometimes useful when looking at browser test failures to know which
157 // GPU blacklisting decisions were made.
158 command_line->AppendSwitch(switches::kLogGpuControlListDecisions);
157 159
158 #if defined(USE_AURA) 160 #if defined(USE_AURA)
159 // Use test contexts for browser tests unless they override and force us to 161 // Use test contexts for browser tests unless they override and force us to
160 // use a real context. 162 // use a real context.
161 if (allow_test_contexts_) 163 if (allow_test_contexts_)
162 command_line->AppendSwitch(switches::kTestCompositor); 164 command_line->AppendSwitch(switches::kTestCompositor);
163 #endif 165 #endif
164 166
165 // When using real GL contexts, we usually use OSMesa as this works on all 167 // When using real GL contexts, we usually use OSMesa as this works on all
166 // bots. The command line can override this behaviour to use a real GPU. 168 // bots. The command line can override this behaviour to use a real GPU.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); 262 RenderProcessHostImpl::GetInProcessRendererThreadForTesting();
261 CHECK(renderer_loop); 263 CHECK(renderer_loop);
262 264
263 renderer_loop->PostTask( 265 renderer_loop->PostTask(
264 FROM_HERE, 266 FROM_HERE,
265 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); 267 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure()));
266 runner->Run(); 268 runner->Run();
267 } 269 }
268 270
269 } // namespace content 271 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698