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

Unified Diff: chrome/renderer/autofill/password_generation_agent_browsertest.cc

Issue 1257603003: Revert of Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/renderer/autofill/password_generation_agent_browsertest.cc
diff --git a/chrome/renderer/autofill/password_generation_agent_browsertest.cc b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
index 3fc06a1e87b108a1d2120bc759a471b8e652fc74..731d7c072aeea4b8103fe2ae56095273d9f6e953 100644
--- a/chrome/renderer/autofill/password_generation_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
@@ -51,7 +51,7 @@
blink::WebElement element =
document.getElementById(blink::WebString::fromUTF8(element_id));
ASSERT_FALSE(element.isNull());
- ExecuteJavaScriptForTests(
+ ExecuteJavaScript(
base::StringPrintf("document.getElementById('%s').focus();",
element_id).c_str());
}
@@ -418,13 +418,12 @@
// Change focus. Bubble should be hidden, but that is handled by AutofilAgent,
// so no messages are sent.
- ExecuteJavaScriptForTests("document.getElementById('username').focus();");
+ ExecuteJavaScript("document.getElementById('username').focus();");
EXPECT_EQ(0u, password_generation_->messages().size());
password_generation_->clear_messages();
// Focusing the password field will bring up the generation UI again.
- ExecuteJavaScriptForTests(
- "document.getElementById('first_password').focus();");
+ ExecuteJavaScript("document.getElementById('first_password').focus();");
ASSERT_EQ(1u, password_generation_->messages().size());
EXPECT_EQ(AutofillHostMsg_ShowPasswordGenerationPopup::ID,
password_generation_->messages()[0]->type());
@@ -444,7 +443,7 @@
LoadHTMLWithUserGesture(kSigninFormHTML);
SetNotBlacklistedMessage(password_generation_, kSigninFormHTML);
- ExecuteJavaScriptForTests(
+ ExecuteJavaScript(
"var form = document.createElement('form');"
"var username = document.createElement('input');"
"username.type = 'text';"

Powered by Google App Engine
This is Rietveld 408576698