| 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 // It is sometimes useful when looking at browser test failures to know which | 112 command_line->AppendSwitch(switches::kSkipGpuDataLoading); |
| 113 // GPU blacklisting decisions were made. | |
| 114 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); | |
| 115 | 113 |
| 116 #if defined(USE_AURA) | 114 #if defined(USE_AURA) |
| 117 // Use test contexts for browser tests unless they override and force us to | 115 // Use test contexts for browser tests unless they override and force us to |
| 118 // use a real context. | 116 // use a real context. |
| 119 if (allow_test_contexts_) | 117 if (allow_test_contexts_) |
| 120 command_line->AppendSwitch(switches::kTestCompositor); | 118 command_line->AppendSwitch(switches::kTestCompositor); |
| 121 #endif | 119 #endif |
| 122 | 120 |
| 123 // When using real GL contexts, we usually use OSMesa as this works on all | 121 // When using real GL contexts, we usually use OSMesa as this works on all |
| 124 // bots. The command line can override this behaviour to use a real GPU. | 122 // 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... |
| 210 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); | 208 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); |
| 211 CHECK(renderer_loop); | 209 CHECK(renderer_loop); |
| 212 | 210 |
| 213 renderer_loop->PostTask( | 211 renderer_loop->PostTask( |
| 214 FROM_HERE, | 212 FROM_HERE, |
| 215 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); | 213 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); |
| 216 runner->Run(); | 214 runner->Run(); |
| 217 } | 215 } |
| 218 | 216 |
| 219 } // namespace content | 217 } // namespace content |
| OLD | NEW |