summaryrefslogtreecommitdiffstats
path: root/components/visitedlink
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-15 12:26:09 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-15 12:26:09 +0000
commitcc99c9f66dbce4965f80edc12d6a4081a341b964 (patch)
tree52811d28f0bddad6c44857a265648884a06945d6 /components/visitedlink
parent9a94f5accfaec1c0eabcd66307b18ee4752991b9 (diff)
downloadchromium_src-cc99c9f66dbce4965f80edc12d6a4081a341b964.zip
chromium_src-cc99c9f66dbce4965f80edc12d6a4081a341b964.tar.gz
chromium_src-cc99c9f66dbce4965f80edc12d6a4081a341b964.tar.bz2
Change RenderViewHostTestHarness to create BrowserContext after thread startup
It better reflects the way the content module works. BUG=251191 R=jam@chromium.org,isherman@chromium.org TBR=joi@chromium.org Review URL: https://chromiumcodereview.appspot.com/18162013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211632 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/visitedlink')
-rw-r--r--components/visitedlink/test/visitedlink_unittest.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc
index 25b11af..36df65e 100644
--- a/components/visitedlink/test/visitedlink_unittest.cc
+++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -592,15 +592,19 @@ class VisitedLinkRenderProcessHostFactory
class VisitedLinkEventsTest : public content::RenderViewHostTestHarness {
public:
virtual void SetUp() {
- browser_context_.reset(new VisitCountingContext());
- master_.reset(new VisitedLinkMaster(context(), &delegate_, true));
- master_->Init();
SetRenderProcessHostFactory(&vc_rph_factory_);
content::RenderViewHostTestHarness::SetUp();
}
- VisitCountingContext* context() const {
- return static_cast<VisitCountingContext*>(browser_context_.get());
+ virtual content::BrowserContext* CreateBrowserContext() OVERRIDE {
+ VisitCountingContext* context = new VisitCountingContext();
+ master_.reset(new VisitedLinkMaster(context, &delegate_, true));
+ master_->Init();
+ return context;
+ }
+
+ VisitCountingContext* context() {
+ return static_cast<VisitCountingContext*>(browser_context());
}
VisitedLinkMaster* master() const {