| Index: chrome/browser/autofill/autofill_manager_unittest.cc
|
| diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
|
| index 284bf9bef4ae1097c6b587c13b116ff690ff8c6f..3705725a75ce4e684c2770d7d61df8e316108415 100644
|
| --- a/chrome/browser/autofill/autofill_manager_unittest.cc
|
| +++ b/chrome/browser/autofill/autofill_manager_unittest.cc
|
| @@ -23,18 +23,19 @@
|
| #include "chrome/browser/autofill/personal_data_manager.h"
|
| #include "chrome/browser/autofill/personal_data_manager_factory.h"
|
| #include "chrome/browser/autofill/test_autofill_external_delegate.h"
|
| +#include "chrome/browser/password_manager/password_manager.h"
|
| +#include "chrome/browser/password_manager/password_manager_delegate_impl.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/sync/profile_sync_service.h"
|
| #include "chrome/browser/sync/profile_sync_service_factory.h"
|
| #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
|
| #include "chrome/browser/ui/browser.h"
|
| -#include "chrome/browser/ui/tab_contents/tab_contents.h"
|
| -#include "chrome/browser/ui/tab_contents/test_tab_contents.h"
|
| #include "chrome/common/autofill_messages.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/form_data.h"
|
| #include "chrome/common/form_field_data.h"
|
| #include "chrome/common/pref_names.h"
|
| +#include "chrome/test/base/chrome_render_view_host_test_harness.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/test/mock_render_process_host.h"
|
| @@ -580,12 +581,12 @@ class TestAutofillManager : public AutofillManager {
|
|
|
| } // namespace
|
|
|
| -class AutofillManagerTest : public TabContentsTestHarness {
|
| +class AutofillManagerTest : public ChromeRenderViewHostTestHarness {
|
| public:
|
| typedef AutofillManager::GUIDPair GUIDPair;
|
|
|
| AutofillManagerTest()
|
| - : TabContentsTestHarness(),
|
| + : ChromeRenderViewHostTestHarness(),
|
| ui_thread_(BrowserThread::UI, &message_loop_),
|
| file_thread_(BrowserThread::FILE) {
|
| }
|
| @@ -602,7 +603,7 @@ class AutofillManagerTest : public TabContentsTestHarness {
|
| PersonalDataManagerFactory::GetInstance()->SetTestingFactory(
|
| profile, TestPersonalDataManager::Build);
|
|
|
| - TabContentsTestHarness::SetUp();
|
| + ChromeRenderViewHostTestHarness::SetUp();
|
| TabAutofillManagerDelegate::CreateForWebContents(web_contents());
|
| autofill_manager_ = new TestAutofillManager(
|
| web_contents(),
|
| @@ -614,7 +615,7 @@ class AutofillManagerTest : public TabContentsTestHarness {
|
|
|
| virtual void TearDown() OVERRIDE {
|
| file_thread_.Stop();
|
| - TabContentsTestHarness::TearDown();
|
| + ChromeRenderViewHostTestHarness::TearDown();
|
| }
|
|
|
| void UpdatePasswordGenerationState(bool new_renderer) {
|
| @@ -2918,6 +2919,11 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
|
| }
|
|
|
| TEST_F(AutofillManagerTest, UpdatePasswordSyncState) {
|
| + PasswordManagerDelegateImpl::CreateForWebContents(web_contents());
|
| + PasswordManager::CreateForWebContentsAndDelegate(
|
| + web_contents(),
|
| + PasswordManagerDelegateImpl::FromWebContents(web_contents()));
|
| +
|
| PrefServiceBase* prefs = PrefServiceBase::FromBrowserContext(profile());
|
|
|
| // Allow this test to control what should get synced.
|
| @@ -2976,6 +2982,11 @@ TEST_F(AutofillManagerTest, UpdatePasswordSyncState) {
|
| }
|
|
|
| TEST_F(AutofillManagerTest, UpdatePasswordGenerationState) {
|
| + PasswordManagerDelegateImpl::CreateForWebContents(web_contents());
|
| + PasswordManager::CreateForWebContentsAndDelegate(
|
| + web_contents(),
|
| + PasswordManagerDelegateImpl::FromWebContents(web_contents()));
|
| +
|
| PrefServiceBase* prefs = PrefServiceBase::FromBrowserContext(profile());
|
|
|
| // Always set password sync enabled so we can test the behavior of password
|
|
|