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

Side by Side Diff: components/password_manager/core/browser/password_manager_unittest.cc

Issue 390393002: Fix GMOCK warnings in PasswordManagerTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to SetUp() Created 6 years, 5 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 | « no previous file | no next file » | 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 <vector> 5 #include <vector>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/pref_registry_simple.h" 8 #include "base/prefs/pref_registry_simple.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 EXPECT_CALL(client_, GetDriver()).WillRepeatedly(Return(&driver_)); 94 EXPECT_CALL(client_, GetDriver()).WillRepeatedly(Return(&driver_));
95 95
96 manager_.reset(new TestPasswordManager(&client_)); 96 manager_.reset(new TestPasswordManager(&client_));
97 password_autofill_manager_.reset( 97 password_autofill_manager_.reset(
98 new PasswordAutofillManager(&client_, NULL)); 98 new PasswordAutofillManager(&client_, NULL));
99 99
100 EXPECT_CALL(driver_, GetPasswordManager()) 100 EXPECT_CALL(driver_, GetPasswordManager())
101 .WillRepeatedly(Return(manager_.get())); 101 .WillRepeatedly(Return(manager_.get()));
102 EXPECT_CALL(driver_, GetPasswordAutofillManager()) 102 EXPECT_CALL(driver_, GetPasswordAutofillManager())
103 .WillRepeatedly(Return(password_autofill_manager_.get())); 103 .WillRepeatedly(Return(password_autofill_manager_.get()));
104 EXPECT_CALL(driver_, DidLastPageLoadEncounterSSLErrors())
105 .WillRepeatedly(Return(false));
104 } 106 }
105 107
106 virtual void TearDown() { 108 virtual void TearDown() {
107 store_->Shutdown(); 109 store_->Shutdown();
108 store_ = NULL; 110 store_ = NULL;
109 } 111 }
110 112
111 PasswordForm MakeSimpleForm() { 113 PasswordForm MakeSimpleForm() {
112 PasswordForm form; 114 PasswordForm form;
113 form.origin = GURL("http://www.google.com/a/LoginAuth"); 115 form.origin = GURL("http://www.google.com/a/LoginAuth");
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))).Times(Exactly(0)); 733 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))).Times(Exactly(0));
732 734
733 // Submit form and finish navigation. 735 // Submit form and finish navigation.
734 manager()->ProvisionallySavePassword(form); 736 manager()->ProvisionallySavePassword(form);
735 observed.clear(); 737 observed.clear();
736 manager()->OnPasswordFormsParsed(observed); 738 manager()->OnPasswordFormsParsed(observed);
737 manager()->OnPasswordFormsRendered(observed, true); 739 manager()->OnPasswordFormsRendered(observed, true);
738 } 740 }
739 741
740 } // namespace password_manager 742 } // namespace password_manager
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698