| 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 29 matching lines...) Expand all Loading... |
| 40 command_line->AppendSwitchASCII(switches::kEnableLogging, "stderr"); | 40 command_line->AppendSwitchASCII(switches::kEnableLogging, "stderr"); |
| 41 if (!command_line->HasSwitch(switches::kLoggingLevel)) | 41 if (!command_line->HasSwitch(switches::kLoggingLevel)) |
| 42 command_line->AppendSwitchASCII(switches::kLoggingLevel, "0"); // info | 42 command_line->AppendSwitchASCII(switches::kLoggingLevel, "0"); // info |
| 43 | 43 |
| 44 // Disable safebrowsing autoupdate. | 44 // Disable safebrowsing autoupdate. |
| 45 command_line->AppendSwitch(switches::kSbDisableAutoUpdate); | 45 command_line->AppendSwitch(switches::kSbDisableAutoUpdate); |
| 46 | 46 |
| 47 // Don't install default apps. | 47 // Don't install default apps. |
| 48 command_line->AppendSwitch(switches::kDisableDefaultApps); | 48 command_line->AppendSwitch(switches::kDisableDefaultApps); |
| 49 | 49 |
| 50 // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist | |
| 51 // auto-update. | |
| 52 command_line->AppendSwitch(switches::kSkipGpuDataLoading); | |
| 53 | |
| 54 #if defined(USE_AURA) | 50 #if defined(USE_AURA) |
| 55 // Disable window animations under Ash as the animations effect the | 51 // Disable window animations under Ash as the animations effect the |
| 56 // coordinates returned and result in flake. | 52 // coordinates returned and result in flake. |
| 57 command_line->AppendSwitch( | 53 command_line->AppendSwitch( |
| 58 views::corewm::switches::kWindowAnimationsDisabled); | 54 views::corewm::switches::kWindowAnimationsDisabled); |
| 59 #endif | 55 #endif |
| 60 | 56 |
| 61 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 57 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
| 62 // Don't use the native password stores on Linux since they may | 58 // Don't use the native password stores on Linux since they may |
| 63 // prompt for additional UI during tests and cause test failures or | 59 // prompt for additional UI during tests and cause test failures or |
| (...skipping 26 matching lines...) Expand all Loading... |
| 90 // Note: we use an environment variable here, because we have to pass the | 86 // Note: we use an environment variable here, because we have to pass the |
| 91 // value to the child process. This is the simplest way to do it. | 87 // value to the child process. This is the simplest way to do it. |
| 92 scoped_ptr<base::Environment> env(base::Environment::Create()); | 88 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 93 success = success && env->SetVar("XDG_CACHE_HOME", user_data_dir.value()); | 89 success = success && env->SetVar("XDG_CACHE_HOME", user_data_dir.value()); |
| 94 #endif | 90 #endif |
| 95 | 91 |
| 96 return success; | 92 return success; |
| 97 } | 93 } |
| 98 | 94 |
| 99 } // namespace test_launcher_utils | 95 } // namespace test_launcher_utils |
| OLD | NEW |