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

Unified Diff: content/public/test/render_view_test.h

Issue 1026493002: Allow only a user gesture to trigger autofill popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not layout frame. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/render_view_test.h
diff --git a/content/public/test/render_view_test.h b/content/public/test/render_view_test.h
index d3fd776e1ca31889dcd932cbc29ae12d6ab8796e..91d0df6bef40fe79e72ecf3f41bd268eb023159f 100644
--- a/content/public/test/render_view_test.h
+++ b/content/public/test/render_view_test.h
@@ -22,6 +22,7 @@
struct ViewMsg_Resize_Params;
namespace blink {
+class WebInputElement;
class WebWidget;
}
@@ -99,7 +100,7 @@ class RenderViewTest : public testing::Test {
void SendWebKeyboardEvent(const blink::WebKeyboardEvent& key_event);
// Send a raw mouse event to the renderer.
- void SendWebMouseEvent(const blink::WebMouseEvent& key_event);
+ void SendWebMouseEvent(const blink::WebMouseEvent& mouse_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.
@@ -130,6 +131,18 @@ class RenderViewTest : public testing::Test {
gfx::Rect resizer_rect,
bool is_fullscreen);
+ // Simulates typing the |ascii_character| into this render view. Also accepts
+ // ui::VKEY_BACK for backspace. Will flush the message loop if
+ // |flush_message_loop| is true.
+ void SimulateUserTypingASCIICharacter(char ascii_character,
+ bool flush_message_loop);
+
+ // Simulates user focusing |input|, erasing all text, and typing the
+ // |new_value| instead. Will process input events for autofill. This is a user
+ // gesture.
+ void SimulateUserInputChangeForElement(blink::WebInputElement* input,
+ const std::string& new_value);
+
// These are all methods from RenderViewImpl that we expose to testing code.
bool OnMessageReceived(const IPC::Message& msg);
void DidNavigateWithinPage(blink::WebLocalFrame* frame,
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698