[Android WebView] Put AndroidStreamReaderURLRequestJob into a namespace
[chromium-blink-merge.git] / content / test / test_render_frame.cc
blob1544c2a382cd37ad6bb35241a8705b1d8950f6e9
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.
5 #include "content/test/test_render_frame.h"
7 #include "base/command_line.h"
8 #include "content/common/navigation_params.h"
9 #include "content/public/common/content_switches.h"
10 #include "content/public/common/resource_response.h"
12 namespace content {
14 // static
15 RenderFrameImpl* TestRenderFrame::CreateTestRenderFrame(
16 const RenderFrameImpl::CreateParams& params) {
17 return new TestRenderFrame(params);
20 TestRenderFrame::TestRenderFrame(const RenderFrameImpl::CreateParams& params)
21 : RenderFrameImpl(params) {
24 TestRenderFrame::~TestRenderFrame() {
27 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params,
28 const StartNavigationParams& start_params,
29 const RequestNavigationParams& request_params) {
30 // PlzNavigate
31 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
32 switches::kEnableBrowserSideNavigation)) {
33 OnCommitNavigation(ResourceResponseHead(), GURL(), common_params,
34 request_params);
35 } else {
36 OnNavigate(common_params, start_params, request_params);
40 void TestRenderFrame::SwapOut(
41 int proxy_routing_id,
42 bool is_loading,
43 const FrameReplicationState& replicated_frame_state) {
44 OnSwapOut(proxy_routing_id, is_loading, replicated_frame_state);
47 void TestRenderFrame::SetEditableSelectionOffsets(int start, int end) {
48 OnSetEditableSelectionOffsets(start, end);
51 void TestRenderFrame::ExtendSelectionAndDelete(int before, int after) {
52 OnExtendSelectionAndDelete(before, after);
55 void TestRenderFrame::Unselect() {
56 OnUnselect();
59 void TestRenderFrame::SetAccessibilityMode(AccessibilityMode new_mode) {
60 OnSetAccessibilityMode(new_mode);
63 void TestRenderFrame::SetCompositionFromExistingText(
64 int start,
65 int end,
66 const std::vector<blink::WebCompositionUnderline>& underlines) {
67 OnSetCompositionFromExistingText(start, end, underlines);
70 } // namespace content