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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc

Issue 2585253002: Integration of PasswordReuseDetector into PasswordStore. (Closed)
Patch Set: Thread fixes Created 4 years 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/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 void SetUp() override { 104 void SetUp() override {
105 test_web_contents_.reset( 105 test_web_contents_.reset(
106 content::WebContentsTester::CreateTestWebContents(&profile_, nullptr)); 106 content::WebContentsTester::CreateTestWebContents(&profile_, nullptr));
107 mock_delegate_.reset(new testing::StrictMock<PasswordsModelDelegateMock>); 107 mock_delegate_.reset(new testing::StrictMock<PasswordsModelDelegateMock>);
108 PasswordStoreFactory::GetInstance()->SetTestingFactoryAndUse( 108 PasswordStoreFactory::GetInstance()->SetTestingFactoryAndUse(
109 profile(), 109 profile(),
110 password_manager::BuildPasswordStore< 110 password_manager::BuildPasswordStore<
111 content::BrowserContext, 111 content::BrowserContext,
112 testing::StrictMock<password_manager::MockPasswordStore>>); 112 testing::StrictMock<password_manager::MockPasswordStore>>);
113 EXPECT_CALL(*GetStore(), FillAutofillableLogins(_));
vabr (Chromium) 2016/12/22 16:15:12 It is a bit strange to expect a call and then retu
dvadym 2016/12/22 16:23:12 PasswordStore initializes PasswordReuseDetector, a
vabr (Chromium) 2016/12/22 16:33:30 Thanks for the explanation. In that case please mo
dvadym 2016/12/22 16:57:57 If I correctly understand, line 108 creates passwo
vabr (Chromium) 2016/12/22 17:14:31 You are right, sorry for missing that! Then please
dvadym 2016/12/22 17:31:18 Thanks, I've updated comment.
113 } 114 }
114 115
115 void TearDown() override { 116 void TearDown() override {
116 // Reset the delegate first. It can happen if the user closes the tab. 117 // Reset the delegate first. It can happen if the user closes the tab.
117 mock_delegate_.reset(); 118 mock_delegate_.reset();
118 model_.reset(); 119 model_.reset();
119 variations::testing::ClearAllVariationIDs(); 120 variations::testing::ClearAllVariationIDs();
120 variations::testing::ClearAllVariationParams(); 121 variations::testing::ClearAllVariationParams();
121 } 122 }
122 123
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 ManageLinkTarget::SETTINGS_PAGE}, 584 ManageLinkTarget::SETTINGS_PAGE},
584 {nullptr, SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE}, 585 {nullptr, SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE},
585 {"Default", SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE}, 586 {"Default", SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE},
586 }; 587 };
587 588
588 } // namespace 589 } // namespace
589 590
590 INSTANTIATE_TEST_CASE_P(Default, 591 INSTANTIATE_TEST_CASE_P(Default,
591 ManagePasswordsBubbleModelManageLinkTest, 592 ManagePasswordsBubbleModelManageLinkTest,
592 ::testing::ValuesIn(kManageLinkTestCases)); 593 ::testing::ValuesIn(kManageLinkTestCases));
OLDNEW
« no previous file with comments | « no previous file | components/password_manager/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698