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

Unified Diff: content/browser/renderer_host/render_view_host_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/renderer_host/render_view_host_browsertest.cc
diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc
index 5e14d47d46089a3986ff82dc81640afc79130100..e593e8f3c9c235547cff668b4214f4243b6ce324 100644
--- a/content/browser/renderer_host/render_view_host_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_browsertest.cc
@@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest, BasicRenderFrameHost) {
EXPECT_TRUE(old_root->current_frame_host());
ShellAddedObserver new_shell_observer;
- EXPECT_TRUE(ExecuteScript(shell()->web_contents(), "window.open();"));
+ EXPECT_TRUE(ExecuteScript(shell(), "window.open();"));
Shell* new_shell = new_shell_observer.GetShell();
FrameTreeNode* new_root = static_cast<WebContentsImpl*>(
new_shell->web_contents())->GetFrameTree()->root();
@@ -126,7 +126,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest, IsFocusedElementEditable) {
RenderViewHost* rvh = shell()->web_contents()->GetRenderViewHost();
EXPECT_FALSE(rvh->IsFocusedElementEditable());
- EXPECT_TRUE(ExecuteScript(shell()->web_contents(), "focus_textfield();"));
+ EXPECT_TRUE(ExecuteScript(shell(), "focus_textfield();"));
EXPECT_TRUE(rvh->IsFocusedElementEditable());
}
@@ -145,7 +145,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest, MAYBE_ReleaseSessionOnCloseACK) {
// Make a new Shell, a seperate tab with it's own session namespace and
// have it start loading a url but still be in progress.
ShellAddedObserver new_shell_observer;
- EXPECT_TRUE(ExecuteScript(shell()->web_contents(), "window.open();"));
+ EXPECT_TRUE(ExecuteScript(shell(), "window.open();"));
Shell* new_shell = new_shell_observer.GetShell();
new_shell->LoadURL(test_url);
RenderViewHost* rvh = new_shell->web_contents()->GetRenderViewHost();

Powered by Google App Engine
This is Rietveld 408576698