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

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 show autofill popup if desktop IME is composing. 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
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 d512c547bced141a42e460340a1cf1e946f6edbf..a7aa5eb23061d82c22eafc4e962233d3dd2229d7 100644
--- a/content/public/test/render_view_test.h
+++ b/content/public/test/render_view_test.h
@@ -18,6 +18,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/WebKit/public/web/WebInputElement.h"
struct ViewMsg_Resize_Params;
@@ -34,6 +35,7 @@ class ContentBrowserClient;
class ContentClient;
class ContentRendererClient;
class FakeCompositorDependencies;
+class MockKeyboard;
class MockRenderProcess;
class PageState;
class RendererMainPlatformDelegate;
@@ -127,6 +129,24 @@ class RenderViewTest : public testing::Test {
gfx::Rect resizer_rect,
bool is_fullscreen);
+ // Sends IPC messages that emulate a key-press event.
+ int SendKeyEvent(const MockKeyboard& keyboard,
+ int key_code,
+ base::string16* output);
+
+ // Simulate typing the |ascii_character| into the browser.
+ void SimulateUserTypingASCIICharacter(char ascii_character);
+
+ // Simulates typing the |key_code| into the browser with Shift pressed if
+ // |is_shift_pressed| is true.
+ void SimulateUserTypingKeyCodeWithShift(int key_code, bool is_shift_pressed);
+
+ // Simulates erasing text in the |input| and typing in the |new_value|
+ // instead. The |input| should be focused to receive the keyboard events.
+ void SimulateUserInputChangeForElement(blink::WebInputElement* input,
+ blink::WebFrame* input_frame,
+ 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,

Powered by Google App Engine
This is Rietveld 408576698