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

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

Issue 293093002: Don't show "Save password" prompt for a failed login (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 unified diff | Download patch
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/strings/string_util.h" 5 #include "base/strings/string_util.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/test/base/chrome_render_view_test.h" 7 #include "chrome/test/base/chrome_render_view_test.h"
8 #include "components/autofill/content/common/autofill_messages.h" 8 #include "components/autofill/content/common/autofill_messages.h"
9 #include "components/autofill/content/renderer/autofill_agent.h" 9 #include "components/autofill/content/renderer/autofill_agent.h"
10 #include "components/autofill/content/renderer/form_autofill_util.h" 10 #include "components/autofill/content/renderer/form_autofill_util.h"
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 ASSERT_EQ(1u, forms3.size()); 732 ASSERT_EQ(1u, forms3.size());
733 EXPECT_FALSE(IsWebNodeVisible(forms3[0])); 733 EXPECT_FALSE(IsWebNodeVisible(forms3[0]));
734 } 734 }
735 735
736 TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest) { 736 TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest) {
737 render_thread_->sink().ClearMessages(); 737 render_thread_->sink().ClearMessages();
738 LoadHTML(kVisibleFormHTML); 738 LoadHTML(kVisibleFormHTML);
739 const IPC::Message* message = render_thread_->sink() 739 const IPC::Message* message = render_thread_->sink()
740 .GetFirstMessageMatching(AutofillHostMsg_PasswordFormsRendered::ID); 740 .GetFirstMessageMatching(AutofillHostMsg_PasswordFormsRendered::ID);
741 EXPECT_TRUE(message); 741 EXPECT_TRUE(message);
742 Tuple1<std::vector<autofill::PasswordForm> > param; 742 Tuple2<std::vector<autofill::PasswordForm>, bool > param;
743 AutofillHostMsg_PasswordFormsRendered::Read(message, &param); 743 AutofillHostMsg_PasswordFormsRendered::Read(message, &param);
744 EXPECT_TRUE(param.a.size()); 744 EXPECT_TRUE(param.a.size());
745 745
746 render_thread_->sink().ClearMessages(); 746 render_thread_->sink().ClearMessages();
747 LoadHTML(kEmptyFormHTML); 747 LoadHTML(kEmptyFormHTML);
748 message = render_thread_->sink().GetFirstMessageMatching( 748 message = render_thread_->sink().GetFirstMessageMatching(
749 AutofillHostMsg_PasswordFormsRendered::ID); 749 AutofillHostMsg_PasswordFormsRendered::ID);
750 EXPECT_TRUE(message); 750 EXPECT_TRUE(message);
751 AutofillHostMsg_PasswordFormsRendered::Read(message, &param); 751 AutofillHostMsg_PasswordFormsRendered::Read(message, &param);
752 EXPECT_FALSE(param.a.size()); 752 EXPECT_FALSE(param.a.size());
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 1331
1332 // Test that the agent sends an IPC call to get the current activity state of 1332 // Test that the agent sends an IPC call to get the current activity state of
1333 // password saving logging soon after construction. 1333 // password saving logging soon after construction.
1334 TEST_F(PasswordAutofillAgentTest, SendsLoggingStateUpdatePingOnConstruction) { 1334 TEST_F(PasswordAutofillAgentTest, SendsLoggingStateUpdatePingOnConstruction) {
1335 const IPC::Message* message = render_thread_->sink().GetFirstMessageMatching( 1335 const IPC::Message* message = render_thread_->sink().GetFirstMessageMatching(
1336 AutofillHostMsg_PasswordAutofillAgentConstructed::ID); 1336 AutofillHostMsg_PasswordAutofillAgentConstructed::ID);
1337 EXPECT_TRUE(message); 1337 EXPECT_TRUE(message);
1338 } 1338 }
1339 1339
1340 } // namespace autofill 1340 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_browsertest.cc ('k') | chrome/test/data/password/done.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698