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

Unified Diff: content/browser/frame_host/navigation_handle_impl_browsertest.cc

Issue 2052633002: Extend the ToRenderFrameHost magic to FrameTreeNode* and Shell* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix induced script bug. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_handle_impl_browsertest.cc b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
index cd9a533a55070607203c196553e6defecd6f1cf4..bf73c175f27878b63809c2c9af939881f238a52a 100644
--- a/content/browser/frame_host/navigation_handle_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
@@ -12,6 +12,7 @@
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
+#include "content/test/content_browser_test_utils_internal.h"
#include "net/dns/mock_host_resolver.h"
#include "ui/base/page_transition_types.h"
#include "url/url_constants.h"
@@ -450,7 +451,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
NavigationHandleObserver observer(
shell()->web_contents(),
embedded_test_server()->GetURL("a.com", "/bar"));
- EXPECT_TRUE(ExecuteScript(root->child_at(0)->current_frame_host(),
+ EXPECT_TRUE(ExecuteScript(root->child_at(0),
"window.history.pushState({}, '', 'bar');"));
EXPECT_TRUE(observer.has_committed());
@@ -486,7 +487,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySynchronous) {
NavigationHandleObserver observer(
shell()->web_contents(), embedded_test_server()->GetURL("a.com", "/bar"));
- EXPECT_TRUE(ExecuteScript(root->child_at(0)->current_frame_host(),
+ EXPECT_TRUE(ExecuteScript(root->child_at(0),
"window.history.pushState({}, '', 'bar');"));
EXPECT_TRUE(observer.has_committed());

Powered by Google App Engine
This is Rietveld 408576698