Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: chrome/browser/download/download_request_limiter_unittest.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android webview init fix merged in. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_request_limiter_unittest.cc
diff --git a/chrome/browser/download/download_request_limiter_unittest.cc b/chrome/browser/download/download_request_limiter_unittest.cc
index 06cd852cd19e29639687bb1feb59224cba1600df..9ec96d2012c9d8b235abe36950a44fcbaaf48764 100644
--- a/chrome/browser/download/download_request_limiter_unittest.cc
+++ b/chrome/browser/download/download_request_limiter_unittest.cc
@@ -14,6 +14,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::WebContents;
@@ -37,7 +38,8 @@ class DownloadRequestLimiterTest : public ChromeRenderViewHostTestHarness {
&DownloadRequestLimiterTest::FakeCreate, base::Unretained(this));
DownloadRequestInfoBarDelegate::SetCallbackForTesting(
&fake_create_callback_);
- content_settings_ = new HostContentSettingsMap(profile_.GetPrefs(), false);
+ content_settings_ = new HostContentSettingsMap(
+ Profile::FromBrowserContext(browser_context())->GetPrefs(), false);
DownloadRequestLimiter::SetContentSettingsForTesting(
content_settings_.get());
}
@@ -139,7 +141,9 @@ class DownloadRequestLimiterTest : public ChromeRenderViewHostTestHarness {
private:
DownloadRequestInfoBarDelegate::FakeCreateCallback fake_create_callback_;
- TestingProfile profile_;
+ virtual content::BrowserContext* CreateBrowserContext() OVERRIDE {
+ return new TestingProfile();
+ }
};
TEST_F(DownloadRequestLimiterTest,

Powered by Google App Engine
This is Rietveld 408576698