diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-23 05:26:40 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-23 05:26:40 +0000 |
commit | ce2f39e2f3206f375584d717999c743da6670bbf (patch) | |
tree | 320c1722c95d9027771ed1d8a442dd3379e7b6dc /components/autofill/browser/test_personal_data_manager.cc | |
parent | 19a02a38120fd47eec89b0ed5a3ba1d32fa24f07 (diff) | |
download | chromium_src-ce2f39e2f3206f375584d717999c743da6670bbf.zip chromium_src-ce2f39e2f3206f375584d717999c743da6670bbf.tar.gz chromium_src-ce2f39e2f3206f375584d717999c743da6670bbf.tar.bz2 |
improved testing for AutofillDialogView.
- add new interface for assisting in testing of AutofillDialogView
- refactor AutofillDialogController browser tests.
- write test which should pass after the linked bug is fixed, but which currently fails.
BUG=231988
TBR=sail@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14096012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/autofill/browser/test_personal_data_manager.cc')
-rw-r--r-- | components/autofill/browser/test_personal_data_manager.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/components/autofill/browser/test_personal_data_manager.cc b/components/autofill/browser/test_personal_data_manager.cc new file mode 100644 index 0000000..98e1973 --- /dev/null +++ b/components/autofill/browser/test_personal_data_manager.cc @@ -0,0 +1,31 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/autofill/browser/test_personal_data_manager.h" + +#include "components/autofill/browser/personal_data_manager_observer.h" + +namespace autofill { + +TestPersonalDataManager::TestPersonalDataManager() + : PersonalDataManager("en-US") {} + +TestPersonalDataManager::~TestPersonalDataManager() {} + +void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) { + profiles_.push_back(profile); + FOR_EACH_OBSERVER(PersonalDataManagerObserver, observers_, + OnPersonalDataChanged()); +} + +const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles() { + return profiles_; +} + +void TestPersonalDataManager::SaveImportedProfile( + const AutofillProfile& imported_profile) { + imported_profile_ = imported_profile; +} + +} // namespace autofill |