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

Unified Diff: chrome/browser/extensions/extension_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/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 7c772f413cbab9ec48800632232d7940b0e80271..f7aba1954f82790d9e2e2dbf78dd7a2fc33e2448 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -552,10 +552,8 @@ void ExtensionBrowserTest::OpenWindow(content::WebContents* contents,
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
- ASSERT_TRUE(content::ExecuteJavaScript(
- contents->GetRenderViewHost(),
- "",
- "window.open('" + url.spec() + "');"));
+ ASSERT_TRUE(content::ExecuteScript(contents,
+ "window.open('" + url.spec() + "');"));
// The above window.open call is not user-initiated, so it will create
// a popup window instead of a new tab in current window.
@@ -581,9 +579,8 @@ void ExtensionBrowserTest::NavigateInRenderer(content::WebContents* contents,
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
- contents->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
+ contents,
"window.addEventListener('unload', function() {"
" window.domAutomationController.send(true);"
"}, false);"
« no previous file with comments | « chrome/browser/extensions/extension_bindings_apitest.cc ('k') | chrome/browser/extensions/extension_dom_clipboard_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698