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

Unified Diff: content/browser/renderer_host/render_widget_host_view_win_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: content/browser/renderer_host/render_widget_host_view_win_browsertest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_win_browsertest.cc
index 8c0bb3074f76bdd8223cf3423f9b9f6e8838bc56..77763ab97ceeca3d622776f5878becdfb736a77f 100644
--- a/content/browser/renderer_host/render_widget_host_view_win_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win_browsertest.cc
@@ -40,9 +40,8 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewWinTest,
// Focus to the text field, the IME should be enabled.
bool success = false;
- EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
- shell()->web_contents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
"window.domAutomationController.send(text01_focus());",
&success));
EXPECT_TRUE(success);
@@ -52,9 +51,8 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewWinTest,
// Focus to the password field, the IME should be disabled.
success = false;
- EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
- shell()->web_contents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
"window.domAutomationController.send(password02_focus());",
&success));
EXPECT_TRUE(success);
@@ -80,9 +78,8 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewWinTest,
// Focus to the text field, the IME should be enabled.
bool success = false;
- EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
- shell()->web_contents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
"window.domAutomationController.send(text01_focus());",
&success));
EXPECT_TRUE(success);
@@ -92,9 +89,8 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewWinTest,
// Focus to another text field, the IME should be enabled.
success = false;
- EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
- shell()->web_contents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
"window.domAutomationController.send(text02_focus());",
&success));
EXPECT_TRUE(success);
@@ -120,9 +116,8 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewWinTest,
// Focus to the password field, the IME should be disabled.
bool success = false;
- EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
- shell()->web_contents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
"window.domAutomationController.send(password01_focus());",
&success));
EXPECT_TRUE(success);
@@ -132,9 +127,8 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewWinTest,
// Focus to the another password field, the IME should be disabled.
success = false;
- EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
- shell()->web_contents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
"window.domAutomationController.send(password02_focus());",
&success));
EXPECT_TRUE(success);
« no previous file with comments | « content/browser/renderer_host/render_view_host_manager_browsertest.cc ('k') | content/browser/session_history_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698