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

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

Issue 509553002: Remove implicit conversions from scoped_refptr to T* in components/password_manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager_unittest.cc » ('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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/testing_pref_service.h" 9 #include "base/prefs/testing_pref_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 saved_match_.origin = GURL("http://accounts.google.com/a/ServiceLoginAuth"); 134 saved_match_.origin = GURL("http://accounts.google.com/a/ServiceLoginAuth");
135 saved_match_.action = GURL("http://accounts.google.com/a/ServiceLogin"); 135 saved_match_.action = GURL("http://accounts.google.com/a/ServiceLogin");
136 saved_match_.preferred = true; 136 saved_match_.preferred = true;
137 saved_match_.username_value = ASCIIToUTF16("test@gmail.com"); 137 saved_match_.username_value = ASCIIToUTF16("test@gmail.com");
138 saved_match_.password_value = ASCIIToUTF16("test1"); 138 saved_match_.password_value = ASCIIToUTF16("test1");
139 saved_match_.other_possible_usernames.push_back( 139 saved_match_.other_possible_usernames.push_back(
140 ASCIIToUTF16("test2@gmail.com")); 140 ASCIIToUTF16("test2@gmail.com"));
141 } 141 }
142 142
143 virtual void TearDown() { 143 virtual void TearDown() {
144 if (mock_store_) 144 if (mock_store_.get())
145 mock_store_->Shutdown(); 145 mock_store_->Shutdown();
146 } 146 }
147 147
148 void InitializeMockStore() { 148 void InitializeMockStore() {
149 if (!mock_store_) { 149 if (!mock_store_.get()) {
150 mock_store_ = new MockPasswordStore(); 150 mock_store_ = new MockPasswordStore();
151 ASSERT_TRUE(mock_store_); 151 ASSERT_TRUE(mock_store_.get());
152 } 152 }
153 } 153 }
154 154
155 MockPasswordStore* mock_store() const { return mock_store_.get(); } 155 MockPasswordStore* mock_store() const { return mock_store_.get(); }
156 156
157 PasswordForm* GetPendingCredentials(PasswordFormManager* p) { 157 PasswordForm* GetPendingCredentials(PasswordFormManager* p) {
158 return &p->pending_credentials_; 158 return &p->pending_credentials_;
159 } 159 }
160 160
161 void SimulateMatchingPhase(PasswordFormManager* p, 161 void SimulateMatchingPhase(PasswordFormManager* p,
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 PasswordStore::ALLOW_PROMPT); 1082 PasswordStore::ALLOW_PROMPT);
1083 RunAllPendingTasks(); 1083 RunAllPendingTasks();
1084 1084
1085 // Make sure that the preferred match is updated appropriately. 1085 // Make sure that the preferred match is updated appropriately.
1086 EXPECT_EQ(ASCIIToUTF16("third"), 1086 EXPECT_EQ(ASCIIToUTF16("third"),
1087 retrieving_manager.preferred_match()->password_value); 1087 retrieving_manager.preferred_match()->password_value);
1088 password_store->Shutdown(); 1088 password_store->Shutdown();
1089 } 1089 }
1090 1090
1091 } // namespace password_manager 1091 } // namespace password_manager
OLDNEW
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698