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

Unified Diff: content/test/test_navigation_handle.cc

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 side-by-side diff with in-line comments
Download patch
Index: content/test/test_navigation_handle.cc
diff --git a/content/test/test_navigation_handle.cc b/content/test/test_navigation_handle.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9340a9d4ef27c82d7b4061155c5d557e52efb4da
--- /dev/null
+++ b/content/test/test_navigation_handle.cc
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/test/test_navigation_handle.h"
+
+namespace content {
+TestNavigationHandle::~TestNavigationHandle() {}
+
+// static
+TestNavigationHandle* TestNavigationHandle::Create(
+ const GURL& url,
+ const GURL& validated_url,
+ const bool is_main_frame,
+ NavigatorDelegate* delegate) {
+ return new TestNavigationHandle(url, validated_url, is_main_frame, delegate);
+}
+
+NavigationThrottle::ThrottleCheckResult
+TestNavigationHandle::SimulateWillStartRequest(
+ bool is_post,
+ const Referrer& sanitized_referrer,
+ bool has_user_gesture,
+ ui::PageTransition transition,
+ bool is_external_protocol) {
+ return WillStartRequest(is_post, sanitized_referrer, has_user_gesture,
+ transition, is_external_protocol);
+}
+
+NavigationThrottle::ThrottleCheckResult
+TestNavigationHandle::SimulateWillRedirectRequest(
+ const GURL& new_url,
+ const GURL& new_validated_url,
+ bool new_method_is_post,
+ const GURL& new_referrer_url,
+ bool new_is_external_protocol) {
+ return WillRedirectRequest(new_url, new_validated_url, new_method_is_post,
+ new_referrer_url, new_is_external_protocol);
+}
+
+TestNavigationHandle::TestNavigationHandle(const GURL& url,
+ const GURL& validated_url,
+ const bool is_main_frame,
+ NavigatorDelegate* delegate)
+ : NavigationHandleImpl(url, validated_url, is_main_frame, delegate) {}
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698