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

Side by Side Diff: chrome/renderer/autofill/password_autofill_manager_browsertest.cc

Issue 9600038: Add Password Autofill Manager to New Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing final nits Created 8 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/autofill/password_autofill_manager.cc ('k') | webkit/forms/form_field.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_util.h" 5 #include "base/string_util.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/common/autofill_messages.h" 7 #include "chrome/common/autofill_messages.h"
8 #include "chrome/renderer/autofill/autofill_agent.h" 8 #include "chrome/renderer/autofill/autofill_agent.h"
9 #include "chrome/renderer/autofill/password_autofill_manager.h" 9 #include "chrome/renderer/autofill/password_autofill_manager.h"
10 #include "chrome/test/base/chrome_render_view_test.h" 10 #include "chrome/test/base/chrome_render_view_test.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class PasswordAutofillManagerTest : public ChromeRenderViewTest { 58 class PasswordAutofillManagerTest : public ChromeRenderViewTest {
59 public: 59 public:
60 PasswordAutofillManagerTest() { 60 PasswordAutofillManagerTest() {
61 } 61 }
62 62
63 // Simulates the fill password form message being sent to the renderer. 63 // Simulates the fill password form message being sent to the renderer.
64 // We use that so we don't have to make RenderView::OnFillPasswordForm() 64 // We use that so we don't have to make RenderView::OnFillPasswordForm()
65 // protected. 65 // protected.
66 void SimulateOnFillPasswordForm( 66 void SimulateOnFillPasswordForm(
67 const PasswordFormFillData& fill_data) { 67 const PasswordFormFillData& fill_data) {
68 AutofillMsg_FillPasswordForm msg(0, fill_data); 68 AutofillMsg_FillPasswordForm msg(0, fill_data, false);
69 password_autofill_->OnMessageReceived(msg); 69 password_autofill_->OnMessageReceived(msg);
70 } 70 }
71 71
72 virtual void SetUp() { 72 virtual void SetUp() {
73 ChromeRenderViewTest::SetUp(); 73 ChromeRenderViewTest::SetUp();
74 74
75 // Add a preferred login and an additional login to the FillData. 75 // Add a preferred login and an additional login to the FillData.
76 username1_ = ASCIIToUTF16(kAliceUsername); 76 username1_ = ASCIIToUTF16(kAliceUsername);
77 password1_ = ASCIIToUTF16(kAlicePassword); 77 password1_ = ASCIIToUTF16(kAlicePassword);
78 username2_ = ASCIIToUTF16(kBobUsername); 78 username2_ = ASCIIToUTF16(kBobUsername);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // didSelectAutofillSuggestion on the renderer. 413 // didSelectAutofillSuggestion on the renderer.
414 autofill_agent_->didSelectAutofillSuggestion(username_element_, 414 autofill_agent_->didSelectAutofillSuggestion(username_element_,
415 ASCIIToUTF16(kAliceUsername), 415 ASCIIToUTF16(kAliceUsername),
416 WebKit::WebString(), 416 WebKit::WebString(),
417 0); 417 0);
418 // Autocomplete should not have kicked in. 418 // Autocomplete should not have kicked in.
419 CheckTextFieldsState("", false, "", false); 419 CheckTextFieldsState("", false, "", false);
420 } 420 }
421 421
422 } // namespace autofill 422 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/password_autofill_manager.cc ('k') | webkit/forms/form_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698