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

Unified Diff: content/browser/loader/resource_dispatcher_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/loader/resource_dispatcher_host_browsertest.cc
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index 3a3a13d5550a94384a5e8d3d346ed4bb960aa980..ac8741aabe745371ecc82ba3010f14d75a0e837a 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -82,7 +82,7 @@ class ResourceDispatcherHostBrowserTest : public ContentBrowserTest,
ShellAddedObserver new_shell_observer;
// Create dynamic popup.
- if (!ExecuteScript(shell()->web_contents(), "OpenPopup();"))
+ if (!ExecuteScript(shell(), "OpenPopup();"))
return false;
Shell* new_shell = new_shell_observer.GetShell();
@@ -189,8 +189,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, SyncXMLHttpRequest) {
// Let's check the XMLHttpRequest ran successfully.
bool success = false;
EXPECT_TRUE(ExecuteScriptAndExtractBool(
- shell()->web_contents(),
- "window.domAutomationController.send(DidSyncRequestSucceed());",
+ shell(), "window.domAutomationController.send(DidSyncRequestSucceed());",
&success));
EXPECT_TRUE(success);
}
@@ -206,9 +205,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
// Let's check the XMLHttpRequest ran successfully.
bool success = false;
EXPECT_TRUE(ExecuteScriptAndExtractBool(
- shell()->web_contents(),
- "window.domAutomationController.send(DidSucceed());",
- &success));
+ shell(), "window.domAutomationController.send(DidSucceed());", &success));
EXPECT_TRUE(success);
}
@@ -405,10 +402,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
std::string redirect_script = "window.location='" +
test_url.possibly_invalid_spec() + "';" +
"window.domAutomationController.send(true);";
- EXPECT_TRUE(ExecuteScriptAndExtractBool(
- shell()->web_contents(),
- redirect_script,
- &success));
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(shell(), redirect_script, &success));
EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
}

Powered by Google App Engine
This is Rietveld 408576698