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

Side by Side Diff: content/public/test/navigation_simulator.cc

Issue 2682313002: Introduce NavigationSimulator to use in unit tests (Closed)
Patch Set: Fixed issue with OOPIF Created 3 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2017 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/public/test/navigation_simulator.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "content/public/browser/render_frame_host.h"
9 #include "content/test/navigation_simulator_impl.h"
10 #include "content/test/test_render_frame_host.h"
11
12 namespace content {
13
14 // static
15 void NavigationSimulator::NavigateAndCommitFromDocument(
16 const GURL& original_url,
17 RenderFrameHost* render_frame_host) {
18 NavigationSimulatorImpl::NavigateAndCommitFromDocument(
19 original_url, static_cast<TestRenderFrameHost*>(render_frame_host));
20 }
21
22 // static
23 void NavigationSimulator::NavigateAndFailFromDocument(
24 const GURL& original_url,
25 int net_error_code,
26 RenderFrameHost* render_frame_host) {
27 NavigationSimulatorImpl::NavigateAndFailFromDocument(
28 original_url, net_error_code,
29 static_cast<TestRenderFrameHost*>(render_frame_host));
30 }
31
32 // static
33 std::unique_ptr<NavigationSimulator>
34 NavigationSimulator::CreateRendererInitiated(
35 const GURL& original_url,
36 RenderFrameHost* render_frame_host) {
37 return base::MakeUnique<NavigationSimulatorImpl>(
38 original_url, static_cast<TestRenderFrameHost*>(render_frame_host));
39 }
40
41 NavigationSimulator::~NavigationSimulator() {}
42
43 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698