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

Side by Side Diff: chrome/browser/renderer_host/intercept_navigation_resource_throttle_unittest.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merged with latest version Created 8 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "chrome/browser/renderer_host/intercept_navigation_resource_throttle.h" 9 #include "chrome/browser/renderer_host/intercept_navigation_resource_throttle.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 private: 81 private:
82 Status status_; 82 Status status_;
83 }; 83 };
84 84
85 // TestIOThreadState ---------------------------------------------------------- 85 // TestIOThreadState ----------------------------------------------------------
86 86
87 class TestIOThreadState { 87 class TestIOThreadState {
88 public: 88 public:
89 TestIOThreadState(const GURL& url, int render_process_id, int render_view_id, 89 TestIOThreadState(const GURL& url, int render_process_id, int render_view_id,
90 MockInterceptCallbackReceiver* callback_receiver) 90 MockInterceptCallbackReceiver* callback_receiver)
91 : request_(url, NULL), 91 : request_(url, NULL, resource_context_.GetRequestContext()),
92 throttle_(NULL) { 92 throttle_(NULL) {
93 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 93 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
94 if (render_process_id != MSG_ROUTING_NONE && 94 if (render_process_id != MSG_ROUTING_NONE &&
95 render_view_id != MSG_ROUTING_NONE) { 95 render_view_id != MSG_ROUTING_NONE) {
96 ResourceRequestInfo::AllocateForTesting(&request_, 96 ResourceRequestInfo::AllocateForTesting(&request_,
97 ResourceType::MAIN_FRAME, 97 ResourceType::MAIN_FRAME,
98 &resource_context_, 98 &resource_context_,
99 render_process_id, 99 render_process_id,
100 render_view_id); 100 render_view_id);
101 } 101 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 RunThrottleWillStartRequestOnIOThread, 278 RunThrottleWillStartRequestOnIOThread,
279 base::Unretained(this), 279 base::Unretained(this),
280 GURL(kUnsafeTestUrl), 280 GURL(kUnsafeTestUrl),
281 web_contents()->GetRenderViewHost()->GetProcess()->GetID(), 281 web_contents()->GetRenderViewHost()->GetProcess()->GetID(),
282 web_contents()->GetRenderViewHost()->GetRoutingID(), 282 web_contents()->GetRenderViewHost()->GetRoutingID(),
283 base::Unretained(&defer))); 283 base::Unretained(&defer)));
284 284
285 // Wait for the request to finish processing. 285 // Wait for the request to finish processing.
286 message_loop_.Run(); 286 message_loop_.Run();
287 } 287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698