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

Side by Side Diff: content/test/test_render_frame.cc

Issue 1206753003: Add a TestRenderFrame to use in RenderViewTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comments Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « content/test/test_render_frame.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "content/test/test_render_frame.h"
6
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"
11
12 namespace content {
13
14 // static
15 RenderFrameImpl* TestRenderFrame::CreateTestRenderFrame(
16 RenderViewImpl* render_view,
17 int32 routing_id) {
18 return new TestRenderFrame(render_view, routing_id);
19 }
20
21 TestRenderFrame::TestRenderFrame(RenderViewImpl* render_view, int32 routing_id)
22 : RenderFrameImpl(render_view, routing_id) {
23 }
24
25 TestRenderFrame::~TestRenderFrame() {
26 }
27
28 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params,
29 const StartNavigationParams& start_params,
30 const RequestNavigationParams& request_params) {
31 // PlzNavigate
32 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
33 switches::kEnableBrowserSideNavigation)) {
34 OnCommitNavigation(ResourceResponseHead(), GURL(), common_params,
35 request_params);
36 } else {
37 OnNavigate(common_params, start_params, request_params);
38 }
39 }
40
41 void TestRenderFrame::SwapOut(
42 int proxy_routing_id,
43 bool is_loading,
44 const FrameReplicationState& replicated_frame_state) {
45 OnSwapOut(proxy_routing_id, is_loading, replicated_frame_state);
46 }
47
48 void TestRenderFrame::SetEditableSelectionOffsets(int start, int end) {
49 OnSetEditableSelectionOffsets(start, end);
50 }
51
52 void TestRenderFrame::ExtendSelectionAndDelete(int before, int after) {
53 OnExtendSelectionAndDelete(before, after);
54 }
55
56 void TestRenderFrame::Unselect() {
57 OnUnselect();
58 }
59
60 void TestRenderFrame::SetAccessibilityMode(AccessibilityMode new_mode) {
61 OnSetAccessibilityMode(new_mode);
62 }
63
64 void TestRenderFrame::SetCompositionFromExistingText(
65 int start,
66 int end,
67 const std::vector<blink::WebCompositionUnderline>& underlines) {
68 OnSetCompositionFromExistingText(start, end, underlines);
69 }
70
71 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_render_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698