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

Unified Diff: chrome/browser/instant/instant_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
Index: chrome/browser/instant/instant_browsertest.cc
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 90ec7a33eee78532433392fb2ea84a1b6fd12d29..1f5749134690abe94320becadac33ad9562a6c3e 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -137,23 +137,21 @@ class InstantTest : public InProcessBrowserTest {
bool GetBoolFromJS(content::RenderViewHost* rvh,
const std::string& script,
bool* result) WARN_UNUSED_RESULT {
- return content::ExecuteJavaScriptAndExtractBool(rvh, "", WrapScript(script),
- result);
+ return content::ExecuteScriptAndExtractBool(rvh, WrapScript(script),
+ result);
}
bool GetIntFromJS(content::RenderViewHost* rvh,
const std::string& script,
int* result) WARN_UNUSED_RESULT {
- return content::ExecuteJavaScriptAndExtractInt(rvh, "", WrapScript(script),
- result);
+ return content::ExecuteScriptAndExtractInt(rvh, WrapScript(script), result);
}
bool GetStringFromJS(content::RenderViewHost* rvh,
const std::string& script,
std::string* result) WARN_UNUSED_RESULT {
- return content::ExecuteJavaScriptAndExtractString(rvh, "",
- WrapScript(script),
- result);
+ return content::ExecuteScriptAndExtractString(rvh, WrapScript(script),
+ result);
}
bool UpdateSearchState(content::WebContents* contents) WARN_UNUSED_RESULT {
@@ -169,10 +167,8 @@ class InstantTest : public InProcessBrowserTest {
}
bool ExecuteScript(const std::string& script) WARN_UNUSED_RESULT {
- return content::ExecuteJavaScript(
- instant()->GetPreviewContents()->GetRenderViewHost(),
- "",
- script);
+ return content::ExecuteScript(
+ instant()->GetPreviewContents()->GetRenderViewHost(), script);
}
bool CheckVisibilityIs(content::WebContents* contents,
« no previous file with comments | « chrome/browser/history/history_browsertest.cc ('k') | chrome/browser/loadtimes_extension_bindings_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698