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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 | 103 |
104 void BrowserTestBase::SetUp() { | 104 void BrowserTestBase::SetUp() { |
105 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 105 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
106 | 106 |
107 // The tests assume that file:// URIs can freely access other file:// URIs. | 107 // The tests assume that file:// URIs can freely access other file:// URIs. |
108 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); | 108 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |
109 | 109 |
110 command_line->AppendSwitch(switches::kDomAutomationController); | 110 command_line->AppendSwitch(switches::kDomAutomationController); |
111 | 111 |
112 command_line->AppendSwitch(switches::kSkipGpuDataLoading); | 112 // It is sometimes useful when looking at browser test failures to know which |
| 113 // GPU blacklisting decisions were made. |
| 114 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); |
113 | 115 |
114 #if defined(USE_AURA) | 116 #if defined(USE_AURA) |
115 // Use test contexts for browser tests unless they override and force us to | 117 // Use test contexts for browser tests unless they override and force us to |
116 // use a real context. | 118 // use a real context. |
117 if (allow_test_contexts_) | 119 if (allow_test_contexts_) |
118 command_line->AppendSwitch(switches::kTestCompositor); | 120 command_line->AppendSwitch(switches::kTestCompositor); |
119 #endif | 121 #endif |
120 | 122 |
121 // When using real GL contexts, we usually use OSMesa as this works on all | 123 // When using real GL contexts, we usually use OSMesa as this works on all |
122 // bots. The command line can override this behaviour to use a real GPU. | 124 // bots. The command line can override this behaviour to use a real GPU. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); | 210 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); |
209 CHECK(renderer_loop); | 211 CHECK(renderer_loop); |
210 | 212 |
211 renderer_loop->PostTask( | 213 renderer_loop->PostTask( |
212 FROM_HERE, | 214 FROM_HERE, |
213 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); | 215 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); |
214 runner->Run(); | 216 runner->Run(); |
215 } | 217 } |
216 | 218 |
217 } // namespace content | 219 } // namespace content |
OLD | NEW |