Index: content/public/test/browser_test_utils.h |
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h |
index 4dce33e2df01ceebc72aab4bc34a01265c7fc7fb..dfa74780ea64b04d8dd9a887aa250f1236d2cca8 100644 |
--- a/content/public/test/browser_test_utils.h |
+++ b/content/public/test/browser_test_utils.h |
@@ -79,13 +79,26 @@ void SimulateMouseEvent(WebContents* web_contents, |
const gfx::Point& point); |
// Sends a key press asynchronously. |
+// The native code of the key event will be set to InvalidNativeKeycode(). |
void SimulateKeyPress(WebContents* web_contents, |
- ui::KeyboardCode key, |
+ ui::KeyboardCode key_code, |
bool control, |
bool shift, |
bool alt, |
bool command); |
+// Sends a key press asynchronously. |
+// |code| specifies the UIEvents (aka: DOM4Events) value of the key: |
+// https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm |
+// The native code of the key event will be set based on |code|. |
+void SimulateKeyPressWithCode(WebContents* web_contents, |
sky
2013/09/06 22:00:28
Style guide says in general we should not have met
weitao
2013/09/06 23:03:51
The two methods have different names: SimulateKeyP
sky
2013/09/08 02:29:03
Good point. Both take codes though. Is there some
weitao
2013/09/09 19:05:59
SimulateKeyPress takes a |key_code| while Simulate
|
+ ui::KeyboardCode key_code, |
+ const char* code, |
+ bool control, |
+ bool shift, |
+ bool alt, |
+ bool command); |
+ |
// Allow ExecuteScript* methods to target either a WebContents or a |
// RenderViewHost. Targetting a WebContents means executing script in the |
// RenderViewHost returned by WebContents::GetRenderViewHost(), which is the |