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

Unified Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 10795090: Move ExecuteJavaScript functions from ui_test_utils.h to browser_test_utils.h so they can be reused… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/automation/automation_misc_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_browsertest.cc
===================================================================
--- chrome/browser/autofill/autofill_browsertest.cc (revision 148111)
+++ chrome/browser/autofill/autofill_browsertest.cc (working copy)
@@ -131,7 +131,7 @@
void ExpectFieldValue(const std::wstring& field_name,
const std::string& expected_value) {
std::string value;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"",
L"window.domAutomationController.send("
L"document.getElementById('" + field_name + L"').value);", &value));
@@ -188,7 +188,7 @@
LOG(WARNING) << "Focusing the first name field.";
bool result = false;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
render_view_host(), L"",
L"if (document.readyState === 'complete')"
L" document.getElementById('firstname').focus();"
@@ -358,17 +358,17 @@
bool unfocused_fired = false;
bool changed_select_fired = false;
bool unchanged_select_fired = false;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
render_view_host(), L"",
L"domAutomationController.send(focused_fired);", &focused_fired));
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
render_view_host(), L"",
L"domAutomationController.send(unfocused_fired);", &unfocused_fired));
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
render_view_host(), L"",
L"domAutomationController.send(changed_select_fired);",
&changed_select_fired));
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
render_view_host(), L"",
L"domAutomationController.send(unchanged_select_fired);",
&unchanged_select_fired));
@@ -378,7 +378,7 @@
EXPECT_FALSE(unchanged_select_fired);
// Unfocus the first name field. Its change event should fire.
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
render_view_host(), L"",
L"document.getElementById('firstname').blur();"
L"domAutomationController.send(focused_fired);", &focused_fired));
@@ -593,8 +593,8 @@
"</script>")));
// Dynamically construct the form.
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(render_view_host(), L"",
- L"BuildForm();"));
+ ASSERT_TRUE(content::ExecuteJavaScript(render_view_host(), L"",
+ L"BuildForm();"));
// Invoke Autofill.
TryBasicFormFill();
@@ -699,7 +699,7 @@
// Simulate translation to kick onTranslateElementLoad.
// But right now, the call stucks here.
// Once click the text field, it starts again.
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
+ ASSERT_TRUE(content::ExecuteJavaScript(
render_view_host(), L"",
L"cr.googleTranslate.onTranslateElementLoad();"));
« no previous file with comments | « no previous file | chrome/browser/automation/automation_misc_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698