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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 switches.SetSwitch("disable-sync"); | 105 switches.SetSwitch("disable-sync"); |
106 switches.SetSwitch("no-first-run"); | 106 switches.SetSwitch("no-first-run"); |
107 switches.SetSwitch("disable-background-networking"); | 107 switches.SetSwitch("disable-background-networking"); |
108 switches.SetSwitch("disable-web-resources"); | 108 switches.SetSwitch("disable-web-resources"); |
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("log-level", "1"); | 115 switches.SetSwitch("log-level", "0"); |
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 switches.SetSwitch("test-type", "webdriver"); |
120 | 120 |
121 for (std::set<std::string>::const_iterator iter = | 121 for (std::set<std::string>::const_iterator iter = |
122 capabilities.exclude_switches.begin(); | 122 capabilities.exclude_switches.begin(); |
123 iter != capabilities.exclude_switches.end(); | 123 iter != capabilities.exclude_switches.end(); |
124 ++iter) { | 124 ++iter) { |
125 switches.RemoveSwitch(*iter); | 125 switches.RemoveSwitch(*iter); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 // Write empty "First Run" file, otherwise Chrome will wipe the default | 718 // Write empty "First Run" file, otherwise Chrome will wipe the default |
719 // profile that was written. | 719 // profile that was written. |
720 if (base::WriteFile( | 720 if (base::WriteFile( |
721 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { | 721 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { |
722 return Status(kUnknownError, "failed to write first run file"); | 722 return Status(kUnknownError, "failed to write first run file"); |
723 } | 723 } |
724 return Status(kOk); | 724 return Status(kOk); |
725 } | 725 } |
726 | 726 |
727 } // namespace internal | 727 } // namespace internal |
OLD | NEW |