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 <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 switches.SetSwitch("safebrowsing-disable-auto-update"); | 109 switches.SetSwitch("safebrowsing-disable-auto-update"); |
110 switches.SetSwitch("safebrowsing-disable-download-protection"); | 110 switches.SetSwitch("safebrowsing-disable-download-protection"); |
111 switches.SetSwitch("disable-client-side-phishing-detection"); | 111 switches.SetSwitch("disable-client-side-phishing-detection"); |
112 switches.SetSwitch("disable-component-update"); | 112 switches.SetSwitch("disable-component-update"); |
113 switches.SetSwitch("disable-default-apps"); | 113 switches.SetSwitch("disable-default-apps"); |
114 switches.SetSwitch("enable-logging"); | 114 switches.SetSwitch("enable-logging"); |
115 switches.SetSwitch("logging-level", "1"); | 115 switches.SetSwitch("logging-level", "1"); |
116 switches.SetSwitch("password-store", "basic"); | 116 switches.SetSwitch("password-store", "basic"); |
117 switches.SetSwitch("use-mock-keychain"); | 117 switches.SetSwitch("use-mock-keychain"); |
118 switches.SetSwitch("remote-debugging-port", base::IntToString(port)); | 118 switches.SetSwitch("remote-debugging-port", base::IntToString(port)); |
| 119 switches.SetSwitch("test-type", "webdriver"); |
119 | 120 |
120 for (std::set<std::string>::const_iterator iter = | 121 for (std::set<std::string>::const_iterator iter = |
121 capabilities.exclude_switches.begin(); | 122 capabilities.exclude_switches.begin(); |
122 iter != capabilities.exclude_switches.end(); | 123 iter != capabilities.exclude_switches.end(); |
123 ++iter) { | 124 ++iter) { |
124 switches.RemoveSwitch(*iter); | 125 switches.RemoveSwitch(*iter); |
125 } | 126 } |
126 switches.SetFromSwitches(capabilities.switches); | 127 switches.SetFromSwitches(capabilities.switches); |
127 | 128 |
128 if (!switches.HasSwitch("user-data-dir")) { | 129 if (!switches.HasSwitch("user-data-dir")) { |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 // Write empty "First Run" file, otherwise Chrome will wipe the default | 718 // Write empty "First Run" file, otherwise Chrome will wipe the default |
718 // profile that was written. | 719 // profile that was written. |
719 if (base::WriteFile( | 720 if (base::WriteFile( |
720 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { | 721 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { |
721 return Status(kUnknownError, "failed to write first run file"); | 722 return Status(kUnknownError, "failed to write first run file"); |
722 } | 723 } |
723 return Status(kOk); | 724 return Status(kOk); |
724 } | 725 } |
725 | 726 |
726 } // namespace internal | 727 } // namespace internal |
OLD | NEW |