| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/test/base/test_launcher_utils.h" | 5 #include "chrome/test/base/test_launcher_utils.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 void PrepareBrowserCommandLineForTests(CommandLine* command_line) { | 23 void PrepareBrowserCommandLineForTests(CommandLine* command_line) { |
| 24 // Turn off tip loading for tests; see http://crbug.com/17725. | 24 // Turn off tip loading for tests; see http://crbug.com/17725. |
| 25 command_line->AppendSwitch(switches::kDisableWebResources); | 25 command_line->AppendSwitch(switches::kDisableWebResources); |
| 26 | 26 |
| 27 // Turn off preconnects because they break the brittle python webserver; | 27 // Turn off preconnects because they break the brittle python webserver; |
| 28 // see http://crbug.com/60035. | 28 // see http://crbug.com/60035. |
| 29 command_line->AppendSwitch(switches::kDisablePreconnect); | 29 command_line->AppendSwitch(switches::kDisablePreconnect); |
| 30 | 30 |
| 31 // Don't show the first run ui. | 31 // Don't show the first run ui. |
| 32 command_line->AppendSwitch(switches::kNoFirstRun); | 32 command_line->AppendSwitch(switches::kSkipFirstRun); |
| 33 | 33 |
| 34 // No default browser check, it would create an info-bar (if we are not the | 34 // No default browser check, it would create an info-bar (if we are not the |
| 35 // default browser) that could conflicts with some tests expectations. | 35 // default browser) that could conflicts with some tests expectations. |
| 36 command_line->AppendSwitch(switches::kNoDefaultBrowserCheck); | 36 command_line->AppendSwitch(switches::kNoDefaultBrowserCheck); |
| 37 | 37 |
| 38 // Enable info level logging to stderr by default so that we can see when | 38 // Enable info level logging to stderr by default so that we can see when |
| 39 // bad stuff happens, but honor the flags specified from the command line. | 39 // bad stuff happens, but honor the flags specified from the command line. |
| 40 if (!command_line->HasSwitch(switches::kEnableLogging)) | 40 if (!command_line->HasSwitch(switches::kEnableLogging)) |
| 41 command_line->AppendSwitchASCII(switches::kEnableLogging, "stderr"); | 41 command_line->AppendSwitchASCII(switches::kEnableLogging, "stderr"); |
| 42 if (!command_line->HasSwitch(switches::kLoggingLevel)) | 42 if (!command_line->HasSwitch(switches::kLoggingLevel)) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const std::string& implementation_name) { | 101 const std::string& implementation_name) { |
| 102 if (command_line->HasSwitch(switches::kUseGL)) | 102 if (command_line->HasSwitch(switches::kUseGL)) |
| 103 return false; | 103 return false; |
| 104 | 104 |
| 105 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name); | 105 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name); |
| 106 | 106 |
| 107 return true; | 107 return true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace test_launcher_utils | 110 } // namespace test_launcher_utils |
| OLD | NEW |