OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/session.h" | 5 #include "chrome/test/webdriver/session.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 181 } |
182 error = NULL; | 182 error = NULL; |
183 RunSessionTask(NewRunnableMethod( | 183 RunSessionTask(NewRunnableMethod( |
184 this, | 184 this, |
185 &Session::SendKeysOnSessionThread, | 185 &Session::SendKeysOnSessionThread, |
186 keys, | 186 keys, |
187 &error)); | 187 &error)); |
188 return error; | 188 return error; |
189 } | 189 } |
190 | 190 |
| 191 Error* Session::SetFilePathsToFileUploadControl( |
| 192 const gfx::Point& location, const std::vector<std::string>& paths) { |
| 193 Error* error = NULL; |
| 194 RunSessionTask(NewRunnableMethod( |
| 195 automation_.get(), |
| 196 &Automation::SetFilePathsToFileUploadControl, |
| 197 current_target_.window_id, |
| 198 location, |
| 199 paths, |
| 200 &error)); |
| 201 return error; |
| 202 } |
| 203 |
191 Error* Session::NavigateToURL(const std::string& url) { | 204 Error* Session::NavigateToURL(const std::string& url) { |
192 Error* error = NULL; | 205 Error* error = NULL; |
193 RunSessionTask(NewRunnableMethod( | 206 RunSessionTask(NewRunnableMethod( |
194 automation_.get(), | 207 automation_.get(), |
195 &Automation::NavigateToURL, | 208 &Automation::NavigateToURL, |
196 current_target_.window_id, | 209 current_target_.window_id, |
197 url, | 210 url, |
198 &error)); | 211 &error)); |
199 return error; | 212 return error; |
200 } | 213 } |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 path, | 1279 path, |
1267 &error)); | 1280 &error)); |
1268 if (error) | 1281 if (error) |
1269 return error; | 1282 return error; |
1270 if (!file_util::ReadFileToString(path, png)) | 1283 if (!file_util::ReadFileToString(path, png)) |
1271 return new Error(kUnknownError, "Could not read screenshot file"); | 1284 return new Error(kUnknownError, "Could not read screenshot file"); |
1272 return NULL; | 1285 return NULL; |
1273 } | 1286 } |
1274 | 1287 |
1275 } // namespace webdriver | 1288 } // namespace webdriver |
OLD | NEW |