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

Unified Diff: chrome/browser/content_settings/content_settings_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/content_settings/content_settings_browsertest.cc
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index c2ff3e27ad893d2dd8ac1ce0cecebb0d12426090..b34c95b1e097114533e971b9aa07adba31f78e26 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -379,10 +379,8 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, LoadAllBlockedPlugins) {
content::TitleWatcher title_watcher2(
chrome::GetActiveWebContents(browser()), expected_title2);
- ASSERT_TRUE(content::ExecuteJavaScript(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- "",
- "window.inject()"));
+ ASSERT_TRUE(content::ExecuteScript(
+ chrome::GetActiveWebContents(browser()), "window.inject()"));
EXPECT_EQ(expected_title2, title_watcher2.WaitAndGetTitle());
}
@@ -396,9 +394,8 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, NoCallbackAtLoad) {
ui_test_utils::NavigateToURL(browser(), url);
// Inject the callback function into the HTML page generated by the browser.
- ASSERT_TRUE(content::ExecuteJavaScript(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScript(
+ chrome::GetActiveWebContents(browser()),
"CallOnStartup = function() { document.title = \"OK\"; }"));
string16 expected_title(ASCIIToUTF16("OK"));
« no previous file with comments | « chrome/browser/chrome_switches_browsertest.cc ('k') | chrome/browser/devtools/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698