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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Rebase Created 5 years, 3 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
(Empty)
1 // Copyright 2015 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 #ifndef CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
6 #define CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
7
8 #include <string>
9
10 #include "content/browser/frame_host/navigation_handle_impl.h"
11 #include "content/public/test/navigation_handle_tester.h"
12
13 namespace content {
14
15 // A test version of the NavigationHandle that can be used to simulate various
16 // navigation call sby embedders of content/.
Charlie Reis 2015/09/16 00:09:25 nit: calls by
clamy 2015/09/16 01:03:22 Done.
17 class TestNavigationHandle : public NavigationHandleImpl,
Charlie Reis 2015/09/16 00:09:25 I'm probably missing something here, but why do we
clamy 2015/09/16 01:03:22 Well the goal here is to have embedders of content
Charlie Reis 2015/09/16 17:39:27 [+nick] I see that you're mostly using the TestFo
nasko 2015/09/16 20:33:39 I'd second that a simpler way of testing is going
18 public NavigationHandleTester {
19 public:
20 ~TestNavigationHandle() override;
21
22 static TestNavigationHandle* Create(const GURL& url,
23 const GURL& validated_url,
24 const bool is_main_frame,
25 NavigatorDelegate* delegate);
26
27 // NavigationHandlerTester implementation.
28 NavigationThrottle::ThrottleCheckResult SimulateWillStartRequest(
29 bool is_post,
30 const Referrer& sanitized_referrer,
31 bool has_user_gesture,
32 ui::PageTransition transition,
33 bool is_external_protocol) override;
34 NavigationThrottle::ThrottleCheckResult SimulateWillRedirectRequest(
35 const GURL& new_url,
36 const GURL& new_validated_url,
37 bool new_method_is_post,
38 const GURL& new_referrer_url,
39 bool new_is_external_protocol) override;
40
41 private:
42 TestNavigationHandle(const GURL& url,
43 const GURL& validated_url,
44 const bool is_main_frame,
45 NavigatorDelegate* delegate);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698