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

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

Issue 23534006: Enable GPU blacklist in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Introduce GpuControlListEntry::LogBlacklistMatch() and fix some GpuFeatureTests. Created 7 years, 3 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 "content/browser/renderer_host/render_process_host_impl.h" 10 #include "content/browser/renderer_host/render_process_host_impl.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 void BrowserTestBase::SetUp() { 95 void BrowserTestBase::SetUp() {
96 CommandLine* command_line = CommandLine::ForCurrentProcess(); 96 CommandLine* command_line = CommandLine::ForCurrentProcess();
97 97
98 // The tests assume that file:// URIs can freely access other file:// URIs. 98 // The tests assume that file:// URIs can freely access other file:// URIs.
99 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); 99 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);
100 100
101 command_line->AppendSwitch(switches::kDomAutomationController); 101 command_line->AppendSwitch(switches::kDomAutomationController);
102 102
103 command_line->AppendSwitch(switches::kSkipGpuDataLoading); 103 // It is sometimes useful when looking at browser test failures to know which
104 // GPU blacklisting decisions were made.
105 command_line->AppendSwitch(switches::kLogGpuBlacklistDecisions);
104 106
105 #if defined(USE_AURA) 107 #if defined(USE_AURA)
106 // Use test contexts for browser tests unless they override and force us to 108 // Use test contexts for browser tests unless they override and force us to
107 // use a real context. 109 // use a real context.
108 if (allow_test_contexts_) 110 if (allow_test_contexts_)
109 command_line->AppendSwitch(switches::kTestCompositor); 111 command_line->AppendSwitch(switches::kTestCompositor);
110 #endif 112 #endif
111 113
112 // When using real GL contexts, we usually use OSMesa as this works on all 114 // When using real GL contexts, we usually use OSMesa as this works on all
113 // bots. The command line can override this behaviour to use a real GPU. 115 // bots. The command line can override this behaviour to use a real GPU.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); 202 RenderProcessHostImpl::GetInProcessRendererThreadForTesting();
201 CHECK(renderer_loop); 203 CHECK(renderer_loop);
202 204
203 renderer_loop->PostTask( 205 renderer_loop->PostTask(
204 FROM_HERE, 206 FROM_HERE,
205 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); 207 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure()));
206 runner->Run(); 208 runner->Run();
207 } 209 }
208 210
209 } // namespace content 211 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698