| Index: content/public/test/mock_render_frame_host.h
|
| diff --git a/content/public/test/mock_render_frame_host.h b/content/public/test/mock_render_frame_host.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ef36856d07f0659434241b5aa8aa4ea290eb63b6
|
| --- /dev/null
|
| +++ b/content/public/test/mock_render_frame_host.h
|
| @@ -0,0 +1,73 @@
|
| +// Copyright 2016 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_PUBLIC_TEST_MOCK_RENDER_FRAME_HOST_H_
|
| +#define CONTENT_PUBLIC_TEST_MOCK_RENDER_FRAME_HOST_H_
|
| +
|
| +#include "content/public/browser/render_frame_host.h"
|
| +
|
| +namespace content {
|
| +
|
| +// A mock class suitable for tests. Tests can override methods they need as
|
| +// required.
|
| +class CONTENT_EXPORT MockRenderFrameHost : public RenderFrameHost {
|
| + public:
|
| + MockRenderFrameHost();
|
| + ~MockRenderFrameHost() override;
|
| +
|
| + // IPC::Sender
|
| + bool Send(IPC::Message* msg) override;
|
| +
|
| + // IPC::Listener
|
| + bool OnMessageReceived(const IPC::Message& message) override;
|
| +
|
| + // RenderFrameHost
|
| + int GetRoutingID() override;
|
| + int GetAXTreeID() override;
|
| + SiteInstance* GetSiteInstance() override;
|
| + RenderProcessHost* GetProcess() override;
|
| + RenderWidgetHostView* GetView() override;
|
| + RenderFrameHost* GetParent() override;
|
| + int GetFrameTreeNodeId() override;
|
| + const std::string& GetFrameName() override;
|
| + bool IsCrossProcessSubframe() override;
|
| + const GURL& GetLastCommittedURL() override;
|
| + url::Origin GetLastCommittedOrigin() override;
|
| + gfx::NativeView GetNativeView() override;
|
| + void AddMessageToConsole(ConsoleMessageLevel level,
|
| + const std::string& message) override;
|
| + void ExecuteJavaScript(const base::string16& javascript) override;
|
| + void ExecuteJavaScript(const base::string16& javascript,
|
| + const JavaScriptResultCallback& callback) override;
|
| + void ExecuteJavaScriptInIsolatedWorld(
|
| + const base::string16& javascript,
|
| + const JavaScriptResultCallback& callback,
|
| + int world_id) override;
|
| + void ExecuteJavaScriptForTests(const base::string16& javascript) override;
|
| + void ExecuteJavaScriptForTests(
|
| + const base::string16& javascript,
|
| + const JavaScriptResultCallback& callback) override;
|
| + void ExecuteJavaScriptWithUserGestureForTests(
|
| + const base::string16& javascript) override;
|
| + void AccessibilitySetFocus(int acc_obj_id) override;
|
| + void AccessibilityDoDefaultAction(int acc_obj_id) override;
|
| + void AccessibilityScrollToMakeVisible(int acc_obj_id,
|
| + const gfx::Rect& subfocus) override;
|
| + void AccessibilityShowContextMenu(int acc_obj_id) override;
|
| + void AccessibilitySetSelection(int anchor_object_id,
|
| + int anchor_offset,
|
| + int focus_object_id,
|
| + int focus_offset) override;
|
| + void ActivateFindInPageResultForAccessibility(int request_id) override;
|
| + void InsertVisualStateCallback(const VisualStateCallback& callback) override;
|
| + RenderViewHost* GetRenderViewHost() override;
|
| + ServiceRegistry* GetServiceRegistry() override;
|
| + blink::WebPageVisibilityState GetVisibilityState() override;
|
| + bool IsRenderFrameLive() override;
|
| + int GetProxyCount() override;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_FRAME_HOST_H_
|
|
|