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

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

Issue 536623003: Fixups in components/ for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 <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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 true); 93 true);
94 94
95 store_ = new MockPasswordStore; 95 store_ = new MockPasswordStore;
96 EXPECT_CALL(*store_.get(), ReportMetrics(_)).Times(AnyNumber()); 96 EXPECT_CALL(*store_.get(), ReportMetrics(_)).Times(AnyNumber());
97 CHECK(store_->Init(syncer::SyncableService::StartSyncFlare(), "")); 97 CHECK(store_->Init(syncer::SyncableService::StartSyncFlare(), ""));
98 98
99 EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage()) 99 EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage())
100 .WillRepeatedly(Return(true)); 100 .WillRepeatedly(Return(true));
101 EXPECT_CALL(client_, IsSyncAccountCredential(_, _)) 101 EXPECT_CALL(client_, IsSyncAccountCredential(_, _))
102 .WillRepeatedly(Return(false)); 102 .WillRepeatedly(Return(false));
103 EXPECT_CALL(client_, GetPasswordStore()).WillRepeatedly(Return(store_)); 103 EXPECT_CALL(client_, GetPasswordStore())
104 .WillRepeatedly(Return(store_.get()));
104 EXPECT_CALL(client_, GetPrefs()).WillRepeatedly(Return(&prefs_)); 105 EXPECT_CALL(client_, GetPrefs()).WillRepeatedly(Return(&prefs_));
105 EXPECT_CALL(client_, GetDriver()).WillRepeatedly(Return(&driver_)); 106 EXPECT_CALL(client_, GetDriver()).WillRepeatedly(Return(&driver_));
106 107
107 manager_.reset(new TestPasswordManager(&client_)); 108 manager_.reset(new TestPasswordManager(&client_));
108 password_autofill_manager_.reset( 109 password_autofill_manager_.reset(
109 new PasswordAutofillManager(&client_, NULL)); 110 new PasswordAutofillManager(&client_, NULL));
110 111
111 EXPECT_CALL(driver_, GetPasswordManager()) 112 EXPECT_CALL(driver_, GetPasswordManager())
112 .WillRepeatedly(Return(manager_.get())); 113 .WillRepeatedly(Return(manager_.get()));
113 EXPECT_CALL(driver_, GetPasswordAutofillManager()) 114 EXPECT_CALL(driver_, GetPasswordAutofillManager())
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 observed.push_back(second_form); 792 observed.push_back(second_form);
792 793
793 // Verify that no prompt to save the password is shown. 794 // Verify that no prompt to save the password is shown.
794 EXPECT_CALL(client_, PromptUserToSavePasswordPtr(_)).Times(Exactly(0)); 795 EXPECT_CALL(client_, PromptUserToSavePasswordPtr(_)).Times(Exactly(0));
795 manager()->OnPasswordFormsParsed(observed); 796 manager()->OnPasswordFormsParsed(observed);
796 manager()->OnPasswordFormsRendered(observed, true); 797 manager()->OnPasswordFormsRendered(observed, true);
797 observed.clear(); 798 observed.clear();
798 } 799 }
799 800
800 } // namespace password_manager 801 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/feedback/feedback_uploader.cc ('k') | components/password_manager/core/browser/password_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698