| 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/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 void BrowserTestBase::SetUp() { | 56 void BrowserTestBase::SetUp() { |
| 57 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 57 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 58 | 58 |
| 59 // The tests assume that file:// URIs can freely access other file:// URIs. | 59 // The tests assume that file:// URIs can freely access other file:// URIs. |
| 60 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); | 60 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 61 | 61 |
| 62 command_line->AppendSwitch(switches::kDomAutomationController); | 62 command_line->AppendSwitch(switches::kDomAutomationController); |
| 63 | 63 |
| 64 command_line->AppendSwitch(switches::kSkipGpuDataLoading); |
| 65 |
| 64 MainFunctionParams params(*command_line); | 66 MainFunctionParams params(*command_line); |
| 65 params.ui_task = | 67 params.ui_task = |
| 66 new base::Closure( | 68 new base::Closure( |
| 67 base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this)); | 69 base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this)); |
| 68 | 70 |
| 69 SetUpInProcessBrowserTestFixture(); | 71 SetUpInProcessBrowserTestFixture(); |
| 70 BrowserMain(params); | 72 BrowserMain(params); |
| 71 TearDownInProcessBrowserTestFixture(); | 73 TearDownInProcessBrowserTestFixture(); |
| 72 } | 74 } |
| 73 | 75 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 86 | 88 |
| 87 void BrowserTestBase::CreateTestServer(const char* test_server_base) { | 89 void BrowserTestBase::CreateTestServer(const char* test_server_base) { |
| 88 CHECK(!test_server_.get()); | 90 CHECK(!test_server_.get()); |
| 89 test_server_.reset(new net::TestServer( | 91 test_server_.reset(new net::TestServer( |
| 90 net::TestServer::TYPE_HTTP, | 92 net::TestServer::TYPE_HTTP, |
| 91 net::TestServer::kLocalhost, | 93 net::TestServer::kLocalhost, |
| 92 FilePath().AppendASCII(test_server_base))); | 94 FilePath().AppendASCII(test_server_base))); |
| 93 } | 95 } |
| 94 | 96 |
| 95 } // namespace content | 97 } // namespace content |
| OLD | NEW |