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

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

Issue 1811913003: PlzNavigate: support NavigationThrottle::WillProcessResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of 1832803002 Created 4 years, 8 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) 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_H_ 5 #ifndef CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_H_
6 #define CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_H_ 6 #define CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
(...skipping 15 matching lines...) Expand all
26 // response. 26 // response.
27 class TestNavigationURLLoader 27 class TestNavigationURLLoader
28 : public NavigationURLLoader, 28 : public NavigationURLLoader,
29 public base::SupportsWeakPtr<TestNavigationURLLoader> { 29 public base::SupportsWeakPtr<TestNavigationURLLoader> {
30 public: 30 public:
31 TestNavigationURLLoader(scoped_ptr<NavigationRequestInfo> request_info, 31 TestNavigationURLLoader(scoped_ptr<NavigationRequestInfo> request_info,
32 NavigationURLLoaderDelegate* delegate); 32 NavigationURLLoaderDelegate* delegate);
33 33
34 // NavigationURLLoader implementation. 34 // NavigationURLLoader implementation.
35 void FollowRedirect() override; 35 void FollowRedirect() override;
36 void ProceedWithResponse() override;
36 37
37 NavigationRequestInfo* request_info() const { return request_info_.get(); } 38 NavigationRequestInfo* request_info() const { return request_info_.get(); }
38 39
39 void SimulateServerRedirect(const GURL& redirect_url); 40 void SimulateServerRedirect(const GURL& redirect_url);
40 41
41 void SimulateError(int error_code); 42 void SimulateError(int error_code);
42 43
43 void CallOnRequestRedirected(const net::RedirectInfo& redirect_info, 44 void CallOnRequestRedirected(const net::RedirectInfo& redirect_info,
44 const scoped_refptr<ResourceResponse>& response); 45 const scoped_refptr<ResourceResponse>& response);
45 void CallOnResponseStarted(const scoped_refptr<ResourceResponse>& response, 46 void CallOnResponseStarted(const scoped_refptr<ResourceResponse>& response,
46 scoped_ptr<StreamHandle> body); 47 scoped_ptr<StreamHandle> body);
47 48
48 int redirect_count() { return redirect_count_; } 49 int redirect_count() { return redirect_count_; }
49 50
51 bool response_proceeded() { return response_proceeded_; }
52
50 private: 53 private:
51 ~TestNavigationURLLoader() override; 54 ~TestNavigationURLLoader() override;
52 55
53 scoped_ptr<NavigationRequestInfo> request_info_; 56 scoped_ptr<NavigationRequestInfo> request_info_;
54 NavigationURLLoaderDelegate* delegate_; 57 NavigationURLLoaderDelegate* delegate_;
55 int redirect_count_; 58 int redirect_count_;
59 bool response_proceeded_;
56 }; 60 };
57 61
58 } // namespace content 62 } // namespace content
59 63
60 #endif // CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_H_ 64 #endif // CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/test/test_navigation_url_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698