| 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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 return; | 1103 return; |
| 1104 | 1104 |
| 1105 if (geolocation_.get()) { | 1105 if (geolocation_.get()) { |
| 1106 geolocation->reset(geolocation_->DeepCopy()); | 1106 geolocation->reset(geolocation_->DeepCopy()); |
| 1107 } else { | 1107 } else { |
| 1108 *error = new Error(kUnknownError, | 1108 *error = new Error(kUnknownError, |
| 1109 "Location must be set before it can be retrieved"); | 1109 "Location must be set before it can be retrieved"); |
| 1110 } | 1110 } |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 void Automation::OverrideGeolocation(DictionaryValue* geolocation, | 1113 void Automation::OverrideGeolocation(const DictionaryValue* geolocation, |
| 1114 Error** error) { | 1114 Error** error) { |
| 1115 *error = CheckGeolocationSupported(); | 1115 *error = CheckGeolocationSupported(); |
| 1116 if (*error) | 1116 if (*error) |
| 1117 return; | 1117 return; |
| 1118 | 1118 |
| 1119 automation::Error auto_error; | 1119 automation::Error auto_error; |
| 1120 if (SendOverrideGeolocationJSONRequest( | 1120 if (SendOverrideGeolocationJSONRequest( |
| 1121 automation(), geolocation, &auto_error)) { | 1121 automation(), geolocation, &auto_error)) { |
| 1122 geolocation_.reset(geolocation->DeepCopy()); | 1122 geolocation_.reset(geolocation->DeepCopy()); |
| 1123 } else { | 1123 } else { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 } | 1192 } |
| 1193 | 1193 |
| 1194 Error* Automation::CheckMaximizeSupported() { | 1194 Error* Automation::CheckMaximizeSupported() { |
| 1195 const char* message = | 1195 const char* message = |
| 1196 "Maximize automation interface is not supported for this version of " | 1196 "Maximize automation interface is not supported for this version of " |
| 1197 "Chrome."; | 1197 "Chrome."; |
| 1198 return CheckVersion(1160, message); | 1198 return CheckVersion(1160, message); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 } // namespace webdriver | 1201 } // namespace webdriver |
| OLD | NEW |