Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 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 warning level logging so that we can see when bad stuff happens. | 38 // Enable warning level logging so that we can see when bad stuff happens. |
| 39 command_line->AppendSwitch(switches::kEnableLogging); | 39 command_line->AppendSwitch(switches::kEnableLogging); |
| 40 command_line->AppendSwitchASCII(switches::kLoggingLevel, "1"); // warning | 40 command_line->AppendSwitchASCII(switches::kLoggingLevel, "1"); // warning |
| 41 | 41 |
| 42 // Disable safebrowsing autoupdate. | 42 // Disable safebrowsing autoupdate. |
| 43 command_line->AppendSwitch(switches::kSbDisableAutoUpdate); | 43 command_line->AppendSwitch(switches::kSbDisableAutoUpdate); |
| 44 | 44 |
| 45 // Unless otherwise specified, disable captive portal detection, to prevent it | |
| 46 // from interfering with tests that don't expect it. | |
| 47 if (!command_line->HasSwitch(switches::kCaptivePortalDetection)) { | |
|
mmenke
2012/07/24 14:24:08
This is necessary because this is called after Set
| |
| 48 command_line->AppendSwitchASCII(switches::kCaptivePortalDetection, | |
| 49 switches::kCaptivePortalDetectionDisabled); | |
| 50 } | |
| 51 | |
| 45 // Don't install default apps. | 52 // Don't install default apps. |
| 46 command_line->AppendSwitch(switches::kDisableDefaultApps); | 53 command_line->AppendSwitch(switches::kDisableDefaultApps); |
| 47 | 54 |
| 48 // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist | 55 // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist |
| 49 // auto-update. | 56 // auto-update. |
| 50 command_line->AppendSwitch(switches::kSkipGpuDataLoading); | 57 command_line->AppendSwitch(switches::kSkipGpuDataLoading); |
| 51 | 58 |
| 52 // 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. |
| 53 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); | 60 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 54 | 61 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 const std::string& implementation_name) { | 107 const std::string& implementation_name) { |
| 101 if (command_line->HasSwitch(switches::kUseGL)) | 108 if (command_line->HasSwitch(switches::kUseGL)) |
| 102 return false; | 109 return false; |
| 103 | 110 |
| 104 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name); | 111 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name); |
| 105 | 112 |
| 106 return true; | 113 return true; |
| 107 } | 114 } |
| 108 | 115 |
| 109 } // namespace test_launcher_utils | 116 } // namespace test_launcher_utils |
| OLD | NEW |