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

Unified Diff: chrome/browser/policy/policy_prefs_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/policy/policy_browsertest.cc ('k') | chrome/browser/popup_blocker_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_prefs_browsertest.cc
diff --git a/chrome/browser/policy/policy_prefs_browsertest.cc b/chrome/browser/policy/policy_prefs_browsertest.cc
index 60e31050d7b674a7e5589f63fc0ff703dac1bcb8..91f7834bd470387100b31d6ea2e15e622ba12011 100644
--- a/chrome/browser/policy/policy_prefs_browsertest.cc
+++ b/chrome/browser/policy/policy_prefs_browsertest.cc
@@ -331,8 +331,8 @@ void VerifyControlledSettingIndicators(Browser* browser,
std::string json;
// Retrieve the state of all controlled setting indicators matching the
// |selector| as JSON.
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- contents->GetRenderViewHost(), "", javascript.str(), &json));
+ ASSERT_TRUE(content::ExecuteScriptAndExtractString(contents, javascript.str(),
+ &json));
scoped_ptr<base::Value> value_ptr(base::JSONReader::Read(json));
const base::ListValue* indicators = NULL;
ASSERT_TRUE(value_ptr.get());
@@ -491,9 +491,8 @@ IN_PROC_BROWSER_TEST_P(PolicyPrefsTest, CheckPolicyIndicators) {
ui_test_utils::NavigateToURL(browser(), GURL(kMainSettingsPage));
if (!(*pref_mapping)->indicator_test_setup_js().empty()) {
- ASSERT_TRUE(content::ExecuteJavaScript(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScript(
+ chrome::GetActiveWebContents(browser()),
(*pref_mapping)->indicator_test_setup_js()));
}
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/popup_blocker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698