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

Unified Diff: content/public/test/navigation_simulator.cc

Issue 2682313002: Introduce NavigationSimulator to use in unit tests (Closed)
Patch Set: Added same-page navigation simulation 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/navigation_simulator.cc
diff --git a/content/public/test/navigation_simulator.cc b/content/public/test/navigation_simulator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bf23090b1d27b387958a56035168946577610754
--- /dev/null
+++ b/content/public/test/navigation_simulator.cc
@@ -0,0 +1,25 @@
+// Copyright 2017 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/public/test/navigation_simulator.h"
+
+#include "base/memory/ptr_util.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/test/navigation_simulator_impl.h"
+#include "content/test/test_render_frame_host.h"
+
+namespace content {
+
+// static
+std::unique_ptr<NavigationSimulator>
+NavigationSimulator::CreateRendererInitiated(
+ const GURL& original_url,
+ RenderFrameHost* render_frame_host) {
+ return base::MakeUnique<NavigationSimulatorImpl>(
+ original_url, static_cast<TestRenderFrameHost*>(render_frame_host));
+}
+
+NavigationSimulator::~NavigationSimulator() {}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698