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

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

Issue 6630001: Allow webdriver users to choose between sending the key events when... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 8 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/automation/automation_json_requests.h ('k') | chrome/test/webdriver/automation.h » ('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/automation/automation_json_requests.h" 5 #include "chrome/test/automation/automation_json_requests.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 dict.SetInteger("nativeKeyCode", key_event.key_code); 442 dict.SetInteger("nativeKeyCode", key_event.key_code);
443 dict.SetInteger("windowsKeyCode", key_event.key_code); 443 dict.SetInteger("windowsKeyCode", key_event.key_code);
444 dict.SetString("unmodifiedText", key_event.unmodified_text); 444 dict.SetString("unmodifiedText", key_event.unmodified_text);
445 dict.SetString("text", key_event.modified_text); 445 dict.SetString("text", key_event.modified_text);
446 dict.SetInteger("modifiers", key_event.modifiers); 446 dict.SetInteger("modifiers", key_event.modifiers);
447 dict.SetBoolean("isSystemKey", false); 447 dict.SetBoolean("isSystemKey", false);
448 DictionaryValue reply_dict; 448 DictionaryValue reply_dict;
449 return SendAutomationJSONRequest(sender, dict, &reply_dict); 449 return SendAutomationJSONRequest(sender, dict, &reply_dict);
450 } 450 }
451 451
452 bool SendNativeKeyEventJSONRequest(
453 AutomationMessageSender* sender,
454 int browser_index,
455 int tab_index,
456 ui::KeyboardCode key_code,
457 int modifiers) {
458 DictionaryValue dict;
459 dict.SetString("command", "SendOSLevelKeyEventToTab");
460 dict.SetInteger("windex", browser_index);
461 dict.SetInteger("tab_index", tab_index);
462 dict.SetInteger("keyCode", key_code);
463 dict.SetInteger("modifiers", modifiers);
464 DictionaryValue reply_dict;
465 return SendAutomationJSONRequest(sender, dict, &reply_dict);
466 }
467
452 bool SendWaitForAllTabsToStopLoadingJSONRequest( 468 bool SendWaitForAllTabsToStopLoadingJSONRequest(
453 AutomationMessageSender* sender) { 469 AutomationMessageSender* sender) {
454 DictionaryValue dict; 470 DictionaryValue dict;
455 dict.SetString("command", "WaitForAllTabsToStopLoading"); 471 dict.SetString("command", "WaitForAllTabsToStopLoading");
456 DictionaryValue reply_dict; 472 DictionaryValue reply_dict;
457 return SendAutomationJSONRequest(sender, dict, &reply_dict); 473 return SendAutomationJSONRequest(sender, dict, &reply_dict);
458 } 474 }
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_json_requests.h ('k') | chrome/test/webdriver/automation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698