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

Unified Diff: components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. Created 7 years, 5 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: components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
diff --git a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
index dfccb30746ce5c70ac77d78272029df0cdb6ba71..e1bd566b54e2e7dcc4f0d1926611ecc9464cd708 100644
--- a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
+++ b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
@@ -26,13 +26,14 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
using testing::_;
using testing::Eq;
-using testing::Property;
using testing::Ne;
+using testing::Property;
using testing::Return;
namespace navigation_interception {
@@ -117,7 +118,8 @@ class TestIOThreadState {
const std::string& request_method,
RedirectMode redirect_mode,
MockInterceptCallbackReceiver* callback_receiver)
- : request_(url, NULL, resource_context_.GetRequestContext()) {
+ : resource_context_(&test_url_request_context_),
+ request_(url, NULL, resource_context_.GetRequestContext()) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
if (render_process_id != MSG_ROUTING_NONE &&
render_view_id != MSG_ROUTING_NONE) {
@@ -164,6 +166,7 @@ class TestIOThreadState {
}
private:
+ net::TestURLRequestContext test_url_request_context_;
content::MockResourceContext resource_context_;
net::URLRequest request_;
scoped_ptr<InterceptNavigationResourceThrottle> throttle_;
« no previous file with comments | « components/autofill/core/browser/autofill_metrics_unittest.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698