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

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

Issue 681823004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "chrome/browser/password_manager/mock_password_store_service.h" 6 #include "chrome/browser/password_manager/mock_password_store_service.h"
7 #include "chrome/browser/password_manager/password_store_factory.h" 7 #include "chrome/browser/password_manager/password_store_factory.h"
8 #include "chrome/browser/ui/passwords/password_manager_presenter.h" 8 #include "chrome/browser/ui/passwords/password_manager_presenter.h"
9 #include "chrome/browser/ui/passwords/password_ui_view.h" 9 #include "chrome/browser/ui/passwords/password_ui_view.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 #if !defined(OS_ANDROID) 46 #if !defined(OS_ANDROID)
47 gfx::NativeWindow MockPasswordUIView::GetNativeWindow() { return NULL; } 47 gfx::NativeWindow MockPasswordUIView::GetNativeWindow() { return NULL; }
48 #endif 48 #endif
49 Profile* MockPasswordUIView::GetProfile() { return profile_; } 49 Profile* MockPasswordUIView::GetProfile() { return profile_; }
50 50
51 class PasswordManagerPresenterTest : public testing::Test { 51 class PasswordManagerPresenterTest : public testing::Test {
52 protected: 52 protected:
53 PasswordManagerPresenterTest() {} 53 PasswordManagerPresenterTest() {}
54 54
55 virtual ~PasswordManagerPresenterTest() {} 55 ~PasswordManagerPresenterTest() override {}
56 virtual void SetUp() override { 56 void SetUp() override {
57 PasswordStoreFactory::GetInstance()->SetTestingFactory( 57 PasswordStoreFactory::GetInstance()->SetTestingFactory(
58 &profile_, MockPasswordStoreService::Build); 58 &profile_, MockPasswordStoreService::Build);
59 mock_controller_.reset(new MockPasswordUIView(&profile_)); 59 mock_controller_.reset(new MockPasswordUIView(&profile_));
60 } 60 }
61 void AddPasswordEntry(const GURL& origin, 61 void AddPasswordEntry(const GURL& origin,
62 const std::string& user_name, 62 const std::string& user_name,
63 const std::string& password); 63 const std::string& password);
64 void AddPasswordException(const GURL& origin); 64 void AddPasswordException(const GURL& origin);
65 void UpdateLists(); 65 void UpdateLists();
66 MockPasswordUIView* GetUIController() { return mock_controller_.get(); } 66 MockPasswordUIView* GetUIController() { return mock_controller_.get(); }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 SetPasswordList( 139 SetPasswordList(
140 Property(&ScopedVector<autofill::PasswordForm>::size, Eq(2u)), 140 Property(&ScopedVector<autofill::PasswordForm>::size, Eq(2u)),
141 testing::_)); 141 testing::_));
142 EXPECT_CALL(*GetUIController(), 142 EXPECT_CALL(*GetUIController(),
143 SetPasswordExceptionList(Property( 143 SetPasswordExceptionList(Property(
144 &ScopedVector<autofill::PasswordForm>::size, Eq(1u)))); 144 &ScopedVector<autofill::PasswordForm>::size, Eq(1u))));
145 UpdateLists(); 145 UpdateLists();
146 } 146 }
147 147
148 } // namespace 148 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698