Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/test/webdriver/automation.cc

Issue 7055004: File upload API in chromedriver (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixing broken build on Windows Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/automation.h ('k') | chrome/test/webdriver/chromedriver_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/automation.h" 5 #include "chrome/test/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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (*error) 335 if (*error)
336 return; 336 return;
337 337
338 std::string error_msg; 338 std::string error_msg;
339 if (!SendMouseDoubleClickJSONRequest( 339 if (!SendMouseDoubleClickJSONRequest(
340 automation(), windex, tab_index, p.x(), p.y(), &error_msg)) { 340 automation(), windex, tab_index, p.x(), p.y(), &error_msg)) {
341 *error = new Error(kUnknownError, error_msg); 341 *error = new Error(kUnknownError, error_msg);
342 } 342 }
343 } 343 }
344 344
345 void Automation::DragAndDropFilePaths(
346 int tab_id, const gfx::Point& location,
347 const std::vector<FilePath::StringType>& paths, Error** error) {
348 int windex = 0, tab_index = 0;
349 *error = GetIndicesForTab(tab_id, &windex, &tab_index);
350 if (*error) {
351 return;
352 }
353
354 std::string error_msg;
355 if (!SendDragAndDropFilePathsJSONRequest(
356 automation(), windex, tab_index, location.x(), location.y(), paths,
357 &error_msg)) {
358 *error = new Error(kUnknownError, error_msg);
359 }
360 }
361
345 void Automation::SendWebKeyEvent(int tab_id, 362 void Automation::SendWebKeyEvent(int tab_id,
346 const WebKeyEvent& key_event, 363 const WebKeyEvent& key_event,
347 Error** error) { 364 Error** error) {
348 int windex = 0, tab_index = 0; 365 int windex = 0, tab_index = 0;
349 *error = GetIndicesForTab(tab_id, &windex, &tab_index); 366 *error = GetIndicesForTab(tab_id, &windex, &tab_index);
350 if (*error) 367 if (*error)
351 return; 368 return;
352 369
353 std::string error_msg; 370 std::string error_msg;
354 if (!SendWebKeyEventJSONRequest( 371 if (!SendWebKeyEventJSONRequest(
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 768, 0, "Alerts are not supported for this version of Chrome"); 674 768, 0, "Alerts are not supported for this version of Chrome");
658 } 675 }
659 676
660 Error* Automation::CheckAdvancedInteractionsSupported() { 677 Error* Automation::CheckAdvancedInteractionsSupported() {
661 const char* message = 678 const char* message =
662 "Advanced user interactions are not supported for this version of Chrome"; 679 "Advanced user interactions are not supported for this version of Chrome";
663 return CheckVersion(750, 0, message); 680 return CheckVersion(750, 0, message);
664 } 681 }
665 682
666 } // namespace webdriver 683 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/automation.h ('k') | chrome/test/webdriver/chromedriver_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698