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/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 Loading... |
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 // It is sometimes useful when looking at browser test failures to know which | 156 command_line->AppendSwitch(switches::kSkipGpuDataLoading); |
157 // GPU blacklisting decisions were made. | |
158 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); | |
159 | 157 |
160 #if defined(USE_AURA) | 158 #if defined(USE_AURA) |
161 // Use test contexts for browser tests unless they override and force us to | 159 // Use test contexts for browser tests unless they override and force us to |
162 // use a real context. | 160 // use a real context. |
163 if (allow_test_contexts_) | 161 if (allow_test_contexts_) |
164 command_line->AppendSwitch(switches::kTestCompositor); | 162 command_line->AppendSwitch(switches::kTestCompositor); |
165 #endif | 163 #endif |
166 | 164 |
167 // When using real GL contexts, we usually use OSMesa as this works on all | 165 // When using real GL contexts, we usually use OSMesa as this works on all |
168 // bots. The command line can override this behaviour to use a real GPU. | 166 // 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 Loading... |
262 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); | 260 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); |
263 CHECK(renderer_loop); | 261 CHECK(renderer_loop); |
264 | 262 |
265 renderer_loop->PostTask( | 263 renderer_loop->PostTask( |
266 FROM_HERE, | 264 FROM_HERE, |
267 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); | 265 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); |
268 runner->Run(); | 266 runner->Run(); |
269 } | 267 } |
270 | 268 |
271 } // namespace content | 269 } // namespace content |
OLD | NEW |