summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 07:38:17 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 07:38:17 +0000
commit93ab5934cb37e79ed6367237eca98cf2ff9d3320 (patch)
treeb355a6f82446d075a8c78d50161863873a06844c /chrome/browser/password_manager
parent9ab0ea353453e0f9a2e97132d86d415ea4192977 (diff)
downloadchromium_src-93ab5934cb37e79ed6367237eca98cf2ff9d3320.zip
chromium_src-93ab5934cb37e79ed6367237eca98cf2ff9d3320.tar.gz
chromium_src-93ab5934cb37e79ed6367237eca98cf2ff9d3320.tar.bz2
Add ChromeRenderViewHostTestHarness to get rid of the dependency from RVHTH to profile
BUG=90443 TEST=everything still works Review URL: http://codereview.chromium.org/7892007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
-rw-r--r--chrome/browser/password_manager/password_manager_unittest.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/password_manager/password_manager_unittest.cc b/chrome/browser/password_manager/password_manager_unittest.cc
index adf4e5c..57fa2a1 100644
--- a/chrome/browser/password_manager/password_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_manager_unittest.cc
@@ -11,9 +11,9 @@
#include "chrome/browser/password_manager/password_manager_delegate.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/common/url_constants.h"
+#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -78,19 +78,19 @@ ACTION_P(SaveToScopedPtr, scoped) {
scoped->reset(arg0);
}
-class PasswordManagerTest : public RenderViewHostTestHarness {
+class PasswordManagerTest : public ChromeRenderViewHostTestHarness {
public:
PasswordManagerTest()
: ui_thread_(BrowserThread::UI, MessageLoopForUI::current()) {}
protected:
virtual void SetUp() {
- RenderViewHostTestHarness::SetUp();
-
store_ = new MockPasswordStore();
- profile_.reset(new TestingProfileWithPasswordStore(store_));
+ browser_context_.reset(new TestingProfileWithPasswordStore(store_));
+ ChromeRenderViewHostTestHarness::SetUp();
+
EXPECT_CALL(delegate_, GetProfileForPasswordManager())
- .WillRepeatedly(Return(profile_.get()));
+ .WillRepeatedly(Return(profile()));
manager_.reset(new PasswordManager(contents(), &delegate_));
EXPECT_CALL(delegate_, DidLastPageLoadEncounterSSLErrors())
.WillRepeatedly(Return(false));
@@ -99,6 +99,7 @@ class PasswordManagerTest : public RenderViewHostTestHarness {
virtual void TearDown() {
manager_.reset();
store_ = NULL;
+ ChromeRenderViewHostTestHarness::TearDown();
}
PasswordForm MakeSimpleForm() {
@@ -119,7 +120,6 @@ class PasswordManagerTest : public RenderViewHostTestHarness {
// We create a UI thread to satisfy PasswordStore.
BrowserThread ui_thread_;
- scoped_ptr<Profile> profile_;
scoped_refptr<MockPasswordStore> store_;
MockPasswordManagerDelegate delegate_; // Owned by manager_.
scoped_ptr<PasswordManager> manager_;