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

Unified Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 11753009: Simplify ExecuteJavaScript* functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update prerender_browsertest.cc. Created 7 years, 12 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
« no previous file with comments | « chrome/browser/ui/browser_focus_uitest.cc ('k') | chrome/browser/ui/panels/panel_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index d30228f564ef0970ee83918c1c6a2b313fc49701..b1cdcc6021f04337972b8c686cf3abc9980c9ecf 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -469,9 +469,8 @@ bool FocusedOnPage(WebContents* web_contents, std::string* result)
WARN_UNUSED_RESULT;
bool FocusedOnPage(WebContents* web_contents, std::string* result) {
- return content::ExecuteJavaScriptAndExtractString(
- web_contents->GetRenderViewHost(),
- "",
+ return content::ExecuteScriptAndExtractString(
+ web_contents,
"window.domAutomationController.send(getFocusedElement());",
result);
}
@@ -514,9 +513,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
EXPECT_EQ(1, ordinal);
// Move the selection to link 1, after searching.
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- web_contents->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScriptAndExtractString(
+ web_contents,
"window.domAutomationController.send(selectLink1());",
&result));
@@ -588,9 +586,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
// Move the selection to link 1, after searching.
std::string result;
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- web_contents->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScriptAndExtractString(
+ web_contents,
"window.domAutomationController.send(selectLink1());",
&result));
@@ -618,9 +615,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
// Move the selection to the text span.
std::string result;
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- web_contents->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScriptAndExtractString(
+ web_contents,
"window.domAutomationController.send(selectSpan());",
&result));
« no previous file with comments | « chrome/browser/ui/browser_focus_uitest.cc ('k') | chrome/browser/ui/panels/panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698