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/webdriver/webdriver_automation.h" | 5 #include "chrome/test/webdriver/webdriver_automation.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 command.AppendSwitch(switches::kNoSandbox); | 357 command.AppendSwitch(switches::kNoSandbox); |
358 } | 358 } |
359 command.AppendSwitch(switches::kEnableLogging); | 359 command.AppendSwitch(switches::kEnableLogging); |
360 command.AppendSwitchASCII(switches::kLoggingLevel, "1"); | 360 command.AppendSwitchASCII(switches::kLoggingLevel, "1"); |
361 command.AppendSwitch(switches::kDisableHangMonitor); | 361 command.AppendSwitch(switches::kDisableHangMonitor); |
362 command.AppendSwitch(switches::kDisablePromptOnRepost); | 362 command.AppendSwitch(switches::kDisablePromptOnRepost); |
363 command.AppendSwitch(switches::kDomAutomationController); | 363 command.AppendSwitch(switches::kDomAutomationController); |
364 command.AppendSwitch(switches::kFullMemoryCrashReport); | 364 command.AppendSwitch(switches::kFullMemoryCrashReport); |
365 command.AppendSwitch(switches::kNoDefaultBrowserCheck); | 365 command.AppendSwitch(switches::kNoDefaultBrowserCheck); |
366 command.AppendSwitch(switches::kNoFirstRun); | 366 command.AppendSwitch(switches::kNoFirstRun); |
367 command.AppendSwitch(switches::kDisableBackgroundNetworking); | |
368 command.AppendSwitch(switches::kDisableSync); | |
369 command.AppendSwitch(switches::kDisableTranslate); | |
370 command.AppendSwitch(switches::kDisableWebResources); | 367 command.AppendSwitch(switches::kDisableWebResources); |
371 command.AppendSwitch(switches::kSbDisableAutoUpdate); | 368 command.AppendSwitch(switches::kSbDisableAutoUpdate); |
372 command.AppendSwitch(switches::kSbDisableDownloadProtection); | |
373 command.AppendSwitch(switches::kDisableClientSidePhishingDetection); | |
374 command.AppendSwitch(switches::kDisableComponentUpdate); | 369 command.AppendSwitch(switches::kDisableComponentUpdate); |
375 command.AppendSwitch(switches::kDisableDefaultApps); | 370 command.AppendSwitch(switches::kDisableDefaultApps); |
376 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 371 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
377 command.AppendSwitchASCII(switches::kPasswordStore, "basic"); | 372 command.AppendSwitchASCII(switches::kPasswordStore, "basic"); |
378 #endif | 373 #endif |
379 #if defined(OS_MACOSX) | 374 #if defined(OS_MACOSX) |
380 command.AppendSwitch(switches::kUseMockKeychain); | 375 command.AppendSwitch(switches::kUseMockKeychain); |
381 #endif | 376 #endif |
382 if (options.detach_process) | 377 if (options.detach_process) |
383 command.AppendSwitch(switches::kAutomationReinitializeOnChannelError); | 378 command.AppendSwitch(switches::kAutomationReinitializeOnChannelError); |
384 if (options.ignore_certificate_errors) | 379 if (options.ignore_certificate_errors) |
385 command.AppendSwitch(switches::kIgnoreCertificateErrors); | 380 command.AppendSwitch(switches::kIgnoreCertificateErrors); |
386 if (options.user_data_dir.empty()) | 381 if (options.user_data_dir.empty()) |
387 command.AppendArg(chrome::kAboutBlankURL); | 382 command.AppendSwitchASCII(switches::kHomePage, chrome::kAboutBlankURL); |
388 | 383 |
389 command.AppendArguments(options.command, true /* include_program */); | 384 command.AppendArguments(options.command, true /* include_program */); |
390 | 385 |
391 // Find the Chrome binary. | 386 // Find the Chrome binary. |
392 if (command.GetProgram().empty()) { | 387 if (command.GetProgram().empty()) { |
393 FilePath browser_exe; | 388 FilePath browser_exe; |
394 if (!GetDefaultChromeExe(&browser_exe)) { | 389 if (!GetDefaultChromeExe(&browser_exe)) { |
395 *error = new Error(kUnknownError, "Could not find default Chrome binary"); | 390 *error = new Error(kUnknownError, "Could not find default Chrome binary"); |
396 return; | 391 return; |
397 } | 392 } |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 } | 1201 } |
1207 | 1202 |
1208 Error* Automation::CheckMaximizeSupported() { | 1203 Error* Automation::CheckMaximizeSupported() { |
1209 const char* message = | 1204 const char* message = |
1210 "Maximize automation interface is not supported for this version of " | 1205 "Maximize automation interface is not supported for this version of " |
1211 "Chrome."; | 1206 "Chrome."; |
1212 return CheckVersion(1160, message); | 1207 return CheckVersion(1160, message); |
1213 } | 1208 } |
1214 | 1209 |
1215 } // namespace webdriver | 1210 } // namespace webdriver |
OLD | NEW |