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

Side by Side Diff: content/test/test_navigation_url_loader.cc

Issue 730553002: PlzNavigate: Refactor unit test helper functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/test/test_navigation_url_loader.h"
6
7 #include "content/browser/loader/navigation_url_loader_delegate.h"
8 #include "content/public/browser/stream_handle.h"
9
10 namespace content {
11
12 TestNavigationURLLoader::TestNavigationURLLoader(
13 const CommonNavigationParams& common_params,
14 scoped_ptr<NavigationRequestInfo> request_info,
15 NavigationURLLoaderDelegate* delegate)
16 : common_params_(common_params),
17 request_info_(request_info.Pass()),
18 delegate_(delegate),
19 redirect_count_(0) {
20 }
21
22 void TestNavigationURLLoader::FollowRedirect() {
23 redirect_count_++;
24 }
25
26 void TestNavigationURLLoader::CallOnRequestRedirected(
27 const net::RedirectInfo& redirect_info,
28 const scoped_refptr<ResourceResponse>& response) {
29 delegate_->OnRequestRedirected(redirect_info, response);
30 }
31
32 void TestNavigationURLLoader::CallOnResponseStarted(
33 const scoped_refptr<ResourceResponse>& response,
34 scoped_ptr<StreamHandle> body) {
35 delegate_->OnResponseStarted(response, body.Pass());
36 }
37
38 TestNavigationURLLoader::~TestNavigationURLLoader() {}
39
40 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698