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

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: cleanup TODOs. merge code. kill more threads. i never get tired of thread carnage. 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 6082e0f69de68b5c06d3b4a872a90c6965b82671..f2e19d82e2186e148b36d1cd53df90fbdedec455 100644
--- a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
+++ b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
@@ -24,13 +24,14 @@
#include "content/public/test/mock_resource_context.h"
#include "content/public/test/test_renderer_host.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 {
@@ -109,7 +110,8 @@ class TestIOThreadState {
int render_view_id,
const std::string& request_method,
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) {
@@ -144,6 +146,7 @@ class TestIOThreadState {
}
private:
+ net::TestURLRequestContext test_url_request_context_;
content::MockResourceContext resource_context_;
net::URLRequest request_;
scoped_ptr<InterceptNavigationResourceThrottle> throttle_;

Powered by Google App Engine
This is Rietveld 408576698