| Index: content/test/test_navigation_handle.h
|
| diff --git a/content/test/test_navigation_handle.h b/content/test/test_navigation_handle.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4f45842543f3c8034de268ea985b0fcd48d44bfa
|
| --- /dev/null
|
| +++ b/content/test/test_navigation_handle.h
|
| @@ -0,0 +1,50 @@
|
| +// 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.
|
| +
|
| +#ifndef CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
|
| +#define CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "content/browser/frame_host/navigation_handle_impl.h"
|
| +#include "content/public/test/navigation_handle_tester.h"
|
| +
|
| +namespace content {
|
| +
|
| +// A test version of the NavigationHandle that can be used to simulate various
|
| +// navigation call sby embedders of content/.
|
| +class TestNavigationHandle : public NavigationHandleImpl,
|
| + public NavigationHandleTester {
|
| + public:
|
| + ~TestNavigationHandle() override;
|
| +
|
| + static TestNavigationHandle* Create(const GURL& url,
|
| + const GURL& validated_url,
|
| + const bool is_main_frame,
|
| + NavigatorDelegate* delegate);
|
| +
|
| + // NavigationHandlerTester implementation.
|
| + NavigationThrottle::ThrottleCheckResult SimulateWillStartRequest(
|
| + bool is_post,
|
| + const Referrer& sanitized_referrer,
|
| + bool has_user_gesture,
|
| + ui::PageTransition transition,
|
| + bool is_external_protocol) override;
|
| + NavigationThrottle::ThrottleCheckResult 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) override;
|
| +
|
| + private:
|
| + TestNavigationHandle(const GURL& url,
|
| + const GURL& validated_url,
|
| + const bool is_main_frame,
|
| + NavigatorDelegate* delegate);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_TEST_TEST_NAVIGATION_HANDLE_H_
|
|
|