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

Unified Diff: chrome/test/webdriver/keymap.h

Issue 3064012: Base implementation of WebDriver for Chrome. This checkin includes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/webdriver/error_codes.h ('k') | chrome/test/webdriver/keymap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/keymap.h
===================================================================
--- chrome/test/webdriver/keymap.h (revision 0)
+++ chrome/test/webdriver/keymap.h (revision 0)
@@ -0,0 +1,39 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_WEBDRIVER_KEYMAP_H_
+#define CHROME_TEST_WEBDRIVER_KEYMAP_H_
+
+#include <map>
+
+#include "base/keyboard_codes.h"
+#include "chrome/test/automation/window_proxy.h"
+
+namespace webdriver {
+
+// Maps the key space used by WebDriver to Chrome for Linux/Mac/Windows.
+class KeyMap {
+ public:
+ KeyMap();
+ base::KeyboardCode Get(const wchar_t& key) const;
+
+ bool Press(const scoped_refptr<WindowProxy>& window,
+ const base::KeyboardCode key_code,
+ const wchar_t& key);
+
+ // Sets the Shift, Alt, Cntl, and Cmd keys to not pressed
+ void ClearModifiers();
+
+ private:
+ bool shift_;
+ bool alt_;
+ bool control_;
+ bool command_;
+ std::map<wchar_t, base::KeyboardCode> keys_;
+ std::map<wchar_t, base::KeyboardCode> shifted_keys_;
+ DISALLOW_COPY_AND_ASSIGN(KeyMap);
+};
+} // namespace webdriver
+#endif // CHROME_TEST_WEBDRIVER_KEYMAP_H_
+
Property changes on: chrome/test/webdriver/keymap.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/test/webdriver/error_codes.h ('k') | chrome/test/webdriver/keymap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698