Chromium Code Reviews| Index: content/test/test_render_frame.cc |
| diff --git a/content/test/test_render_frame.cc b/content/test/test_render_frame.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..600fb0911fbb125fa446e3148c99cdce556ff01b |
| --- /dev/null |
| +++ b/content/test/test_render_frame.cc |
| @@ -0,0 +1,71 @@ |
| +// 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_render_frame.h" |
| + |
| +#include "base/command_line.h" |
| +#include "content/common/navigation_params.h" |
| +#include "content/public/common/content_switches.h" |
| +#include "content/public/common/resource_response.h" |
| + |
| +namespace content { |
| + |
| +// static |
| +RenderFrameImpl* TestRenderFrame::CreateTestRenderFrame( |
| + RenderViewImpl* render_view, |
| + int32 routing_id) { |
| + return new TestRenderFrame(render_view, routing_id); |
| +} |
| + |
| +TestRenderFrame::~TestRenderFrame() { |
| +} |
| + |
| +void TestRenderFrame::Navigate(const CommonNavigationParams& common_params, |
| + const StartNavigationParams& start_params, |
| + const RequestNavigationParams& request_params) { |
| + // PlzNavigate |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableBrowserSideNavigation)) { |
| + OnCommitNavigation(ResourceResponseHead(), GURL(), common_params, |
| + request_params); |
| + } else { |
| + OnNavigate(common_params, start_params, request_params); |
| + } |
| +} |
| + |
| +void TestRenderFrame::SwapOut( |
| + int proxy_routing_id, |
| + bool is_loading, |
| + const FrameReplicationState& replicated_frame_state) { |
| + OnSwapOut(proxy_routing_id, is_loading, replicated_frame_state); |
| +} |
| + |
| +void TestRenderFrame::SetEditableSelectionOffsets(int start, int end) { |
| + OnSetEditableSelectionOffsets(start, end); |
| +} |
| + |
| +void TestRenderFrame::ExtendSelectionAndDelete(int before, int after) { |
| + OnExtendSelectionAndDelete(before, after); |
| +} |
| + |
| +void TestRenderFrame::Unselect() { |
| + OnUnselect(); |
| +} |
| + |
| +void TestRenderFrame::SetAccessibilityMode(AccessibilityMode new_mode) { |
| + OnSetAccessibilityMode(new_mode); |
| +} |
| + |
| +void TestRenderFrame::SetCompositionFromExistingText( |
| + int start, |
| + int end, |
| + const std::vector<blink::WebCompositionUnderline>& underlines) { |
| + OnSetCompositionFromExistingText(start, end, underlines); |
| +} |
| + |
| +TestRenderFrame::TestRenderFrame(RenderViewImpl* render_view, int32 routing_id) |
|
nasko
2015/06/24 14:18:02
Let's move the constructor above the destructor. I
clamy
2015/06/24 14:51:03
Done.
|
| + : RenderFrameImpl(render_view, routing_id) { |
| +} |
| + |
| +} // namespace content |