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" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "ui/gfx/gl/gl_switches.h" | 15 #include "ui/gfx/gl/gl_switches.h" |
16 | 16 |
17 #if defined(USE_AURA) | 17 #if defined(USE_ASH) |
18 #include "ash/ash_switches.h" | 18 #include "ash/ash_switches.h" |
19 #endif | 19 #endif |
20 | 20 |
21 namespace test_launcher_utils { | 21 namespace test_launcher_utils { |
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; |
(...skipping 17 matching lines...) Expand all Loading... |
45 // Don't install default apps. | 45 // Don't install default apps. |
46 command_line->AppendSwitch(switches::kDisableDefaultApps); | 46 command_line->AppendSwitch(switches::kDisableDefaultApps); |
47 | 47 |
48 // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist | 48 // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist |
49 // auto-update. | 49 // auto-update. |
50 command_line->AppendSwitch(switches::kSkipGpuDataLoading); | 50 command_line->AppendSwitch(switches::kSkipGpuDataLoading); |
51 | 51 |
52 // The tests assume that file:// URIs can freely access other file:// URIs. | 52 // The tests assume that file:// URIs can freely access other file:// URIs. |
53 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); | 53 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |
54 | 54 |
55 // TODO(beng): USE_ASH. | 55 #if defined(USE_ASH) |
56 #if defined(USE_AURA) | |
57 // Disable window animations under aura as the animations effect the | 56 // Disable window animations under aura as the animations effect the |
58 // coordinates returned and result in flake. | 57 // coordinates returned and result in flake. |
59 command_line->AppendSwitch(ash::switches::kAuraWindowAnimationsDisabled); | 58 command_line->AppendSwitch(ash::switches::kAuraWindowAnimationsDisabled); |
60 #endif | 59 #endif |
61 | 60 |
62 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 61 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
63 // Don't use the native password stores on Linux since they may | 62 // Don't use the native password stores on Linux since they may |
64 // prompt for additional UI during tests and cause test failures or | 63 // prompt for additional UI during tests and cause test failures or |
65 // timeouts. Win, Mac and ChromeOS don't look at the kPasswordStore | 64 // timeouts. Win, Mac and ChromeOS don't look at the kPasswordStore |
66 // switch. | 65 // switch. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 const std::string& implementation_name) { | 102 const std::string& implementation_name) { |
104 if (command_line->HasSwitch(switches::kUseGL)) | 103 if (command_line->HasSwitch(switches::kUseGL)) |
105 return false; | 104 return false; |
106 | 105 |
107 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name); | 106 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name); |
108 | 107 |
109 return true; | 108 return true; |
110 } | 109 } |
111 | 110 |
112 } // namespace test_launcher_utils | 111 } // namespace test_launcher_utils |
OLD | NEW |