| 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 "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 Loading... |
| 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 #if defined(OS_LINUX) || defined(OS_MACOSX) |
| 104 // TODO(gab): Enable GPU blacklist usage on all the bots |
| 105 // (http://crbug.com/277242). |
| 103 command_line->AppendSwitch(switches::kSkipGpuDataLoading); | 106 command_line->AppendSwitch(switches::kSkipGpuDataLoading); |
| 107 #endif |
| 104 | 108 |
| 105 #if defined(USE_AURA) | 109 #if defined(USE_AURA) |
| 106 // Use test contexts for browser tests unless they override and force us to | 110 // Use test contexts for browser tests unless they override and force us to |
| 107 // use a real context. | 111 // use a real context. |
| 108 if (allow_test_contexts_) | 112 if (allow_test_contexts_) |
| 109 command_line->AppendSwitch(switches::kTestCompositor); | 113 command_line->AppendSwitch(switches::kTestCompositor); |
| 110 #endif | 114 #endif |
| 111 | 115 |
| 112 // When using real GL contexts, we usually use OSMesa as this works on all | 116 // 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. | 117 // 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 Loading... |
| 200 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); | 204 RenderProcessHostImpl::GetInProcessRendererThreadForTesting(); |
| 201 CHECK(renderer_loop); | 205 CHECK(renderer_loop); |
| 202 | 206 |
| 203 renderer_loop->PostTask( | 207 renderer_loop->PostTask( |
| 204 FROM_HERE, | 208 FROM_HERE, |
| 205 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); | 209 base::Bind(&RunTaskOnRendererThread, task, runner->QuitClosure())); |
| 206 runner->Run(); | 210 runner->Run(); |
| 207 } | 211 } |
| 208 | 212 |
| 209 } // namespace content | 213 } // namespace content |
| OLD | NEW |