diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/test/render_view_test.cc | 5 | ||||
-rw-r--r-- | content/test/render_view_test.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/content/test/render_view_test.cc b/content/test/render_view_test.cc index 38df184..8fdf656 100644 --- a/content/test/render_view_test.cc +++ b/content/test/render_view_test.cc @@ -230,6 +230,11 @@ int RenderViewTest::SendKeyEvent(MockKeyboard::Layout layout, void RenderViewTest::SendNativeKeyEvent( const NativeWebKeyboardEvent& key_event) { + SendWebKeyboardEvent(key_event); +} + +void RenderViewTest::SendWebKeyboardEvent( + const WebKit::WebKeyboardEvent& key_event) { scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); input_message->WriteData(reinterpret_cast<const char*>(&key_event), sizeof(WebKit::WebKeyboardEvent)); diff --git a/content/test/render_view_test.h b/content/test/render_view_test.h index 436d594..6463602 100644 --- a/content/test/render_view_test.h +++ b/content/test/render_view_test.h @@ -82,6 +82,9 @@ class RenderViewTest : public testing::Test { // Sends one native key event over IPC. void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); + // Send a raw keyboard event to the renderer. + void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); + // Returns the bounds (coordinates and size) of the element with id // |element_id|. Returns an empty rect if such an element was not found. gfx::Rect GetElementBounds(const std::string& element_id); |