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

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

Issue 686653003: Don't use FormFieldData only as a key in a map (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 1 month 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 | « no previous file | components/autofill/content/common/autofill_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/password_autofill_agent_browsertest.cc
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index d4362b331131c7eff87209e4717ece0eb22fb57a..d9c08c9adac1461b93141d1b9705c3a71545b4d9 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -36,6 +36,8 @@ using blink::WebView;
namespace {
+const int kPasswordFillFormDataId = 1234;
+
// The name of the username/password element in the form.
const char kUsernameName[] = "username";
const char kPasswordName[] = "password";
@@ -175,7 +177,7 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
// protected.
void SimulateOnFillPasswordForm(
const PasswordFormFillData& fill_data) {
- AutofillMsg_FillPasswordForm msg(0, fill_data);
+ AutofillMsg_FillPasswordForm msg(0, kPasswordFillFormDataId, fill_data);
static_cast<content::RenderViewObserver*>(password_autofill_agent_)
->OnMessageReceived(msg);
}
@@ -394,13 +396,13 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
render_thread_->sink().GetFirstMessageMatching(
AutofillHostMsg_ShowPasswordSuggestions::ID);
EXPECT_TRUE(message);
- Tuple4<autofill::FormFieldData, base::string16, bool, gfx::RectF> args;
+ Tuple5<int, base::i18n::TextDirection, base::string16, bool, gfx::RectF>
+ args;
AutofillHostMsg_ShowPasswordSuggestions::Read(message, &args);
EXPECT_EQ(2u, fill_data_.basic_data.fields.size());
- EXPECT_EQ(fill_data_.basic_data.fields[0].name, args.a.name);
- EXPECT_EQ(ASCIIToUTF16(username), args.a.value);
- EXPECT_EQ(ASCIIToUTF16(username), args.b);
- EXPECT_EQ(show_all, args.c);
+ EXPECT_EQ(kPasswordFillFormDataId, args.a);
+ EXPECT_EQ(ASCIIToUTF16(username), args.c);
+ EXPECT_EQ(show_all, args.d);
render_thread_->sink().ClearMessages();
}
« no previous file with comments | « no previous file | components/autofill/content/common/autofill_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698