| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromedriver/chrome_launcher.h" | 5 #include "chrome/test/chromedriver/chrome_launcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include <fcntl.h> | 55 #include <fcntl.h> |
| 56 #include <sys/stat.h> | 56 #include <sys/stat.h> |
| 57 #include <sys/types.h> | 57 #include <sys/types.h> |
| 58 #elif defined(OS_WIN) | 58 #elif defined(OS_WIN) |
| 59 #include "chrome/test/chromedriver/keycode_text_conversion.h" | 59 #include "chrome/test/chromedriver/keycode_text_conversion.h" |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 namespace { | 62 namespace { |
| 63 | 63 |
| 64 const char* const kCommonSwitches[] = { | 64 const char* const kCommonSwitches[] = { |
| 65 "disable-infobars", | 65 "disable-popup-blocking", "enable-automation", "ignore-certificate-errors", |
| 66 "disable-popup-blocking", | 66 "metrics-recording-only", |
| 67 "ignore-certificate-errors", | |
| 68 "metrics-recording-only", | |
| 69 }; | 67 }; |
| 70 | 68 |
| 71 const char* const kDesktopSwitches[] = { | 69 const char* const kDesktopSwitches[] = { |
| 72 "disable-hang-monitor", | 70 "disable-hang-monitor", |
| 73 "disable-prompt-on-repost", | 71 "disable-prompt-on-repost", |
| 74 "disable-sync", | 72 "disable-sync", |
| 75 "no-first-run", | 73 "no-first-run", |
| 76 "disable-background-networking", | 74 "disable-background-networking", |
| 77 "disable-web-resources", | 75 "disable-web-resources", |
| 78 "safebrowsing-disable-auto-update", | 76 "safebrowsing-disable-auto-update", |
| 79 "disable-client-side-phishing-detection", | 77 "disable-client-side-phishing-detection", |
| 80 "disable-default-apps", | 78 "disable-default-apps", |
| 81 "enable-logging", | 79 "enable-logging", |
| 82 "log-level=0", | 80 "log-level=0", |
| 83 "password-store=basic", | 81 "password-store=basic", |
| 84 "use-mock-keychain", | 82 "use-mock-keychain", |
| 85 "test-type=webdriver", | 83 "test-type=webdriver", |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 const char* const kAndroidSwitches[] = { | 86 const char* const kAndroidSwitches[] = { |
| 89 "disable-fre", | 87 "disable-fre", "enable-remote-debugging", |
| 90 "enable-remote-debugging", | |
| 91 }; | 88 }; |
| 92 | 89 |
| 93 #if defined(OS_LINUX) | 90 #if defined(OS_LINUX) |
| 94 const char kEnableCrashReport[] = "enable-crash-reporter-for-testing"; | 91 const char kEnableCrashReport[] = "enable-crash-reporter-for-testing"; |
| 95 #endif | 92 #endif |
| 96 | 93 |
| 97 Status UnpackAutomationExtension(const base::FilePath& temp_dir, | 94 Status UnpackAutomationExtension(const base::FilePath& temp_dir, |
| 98 base::FilePath* automation_extension) { | 95 base::FilePath* automation_extension) { |
| 99 std::string decoded_extension; | 96 std::string decoded_extension; |
| 100 if (!base::Base64Decode(kAutomationExtension, &decoded_extension)) | 97 if (!base::Base64Decode(kAutomationExtension, &decoded_extension)) |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 // Write empty "First Run" file, otherwise Chrome will wipe the default | 876 // Write empty "First Run" file, otherwise Chrome will wipe the default |
| 880 // profile that was written. | 877 // profile that was written. |
| 881 if (base::WriteFile( | 878 if (base::WriteFile( |
| 882 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { | 879 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { |
| 883 return Status(kUnknownError, "failed to write first run file"); | 880 return Status(kUnknownError, "failed to write first run file"); |
| 884 } | 881 } |
| 885 return Status(kOk); | 882 return Status(kOk); |
| 886 } | 883 } |
| 887 | 884 |
| 888 } // namespace internal | 885 } // namespace internal |
| OLD | NEW |