From ce2f39e2f3206f375584d717999c743da6670bbf Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Tue, 23 Apr 2013 05:26:40 +0000 Subject: 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 --- .../autofill/browser/test_personal_data_manager.cc | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 components/autofill/browser/test_personal_data_manager.cc (limited to 'components/autofill/browser/test_personal_data_manager.cc') 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& TestPersonalDataManager::GetProfiles() { + return profiles_; +} + +void TestPersonalDataManager::SaveImportedProfile( + const AutofillProfile& imported_profile) { + imported_profile_ = imported_profile; +} + +} // namespace autofill -- cgit v1.1