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

Unified Diff: chrome/renderer/autofill/autofill_renderer_browsertest.cc

Issue 16049009: [autofill] Show autofill suggestions on tap gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compile errors for tests Created 7 years, 6 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: chrome/renderer/autofill/autofill_renderer_browsertest.cc
diff --git a/chrome/renderer/autofill/autofill_renderer_browsertest.cc b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
index c5d3d626f16f1847871374d08d638993219ff399..c64aca400e38e1b03e0b7c4a9da0124f68ad0eb7 100644
--- a/chrome/renderer/autofill/autofill_renderer_browsertest.cc
+++ b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
@@ -7,6 +7,7 @@
#include "components/autofill/common/autofill_messages.h"
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/form_field_data.h"
+#include "components/autofill/renderer/page_click_listener.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
@@ -260,7 +261,7 @@ TEST_F(ChromeRenderViewTest, ShowAutofillWarning) {
// Simulate attempting to Autofill the form from the first element, which
// specifies autocomplete="off". This should still not trigger an IPC, as we
// don't show warnings for elements that have autocomplete="off".
- autofill_agent_->InputElementClicked(firstname, true, true);
+ autofill_agent_->InputElementClicked(firstname, true, true, MOUSE_CLICK);
const IPC::Message* message1 = render_thread_->sink().GetFirstMessageMatching(
AutofillHostMsg_QueryFormFieldAutofill::ID);
EXPECT_EQ(static_cast<IPC::Message*>(NULL), message1);
@@ -269,7 +270,7 @@ TEST_F(ChromeRenderViewTest, ShowAutofillWarning) {
// does not specify autocomplete="off". This *should* trigger an IPC, as we
// *do* show warnings for elements that don't themselves set
// autocomplete="off", but for which the form does.
- autofill_agent_->InputElementClicked(middlename, true, true);
+ autofill_agent_->InputElementClicked(middlename, true, true, MOUSE_CLICK);
const IPC::Message* message2 = render_thread_->sink().GetFirstMessageMatching(
AutofillHostMsg_QueryFormFieldAutofill::ID);
ASSERT_NE(static_cast<IPC::Message*>(NULL), message2);

Powered by Google App Engine
This is Rietveld 408576698