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

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

Issue 2650623002: Use explicit WebString conversions in autofill (Closed)
Patch Set: . Created 3 years, 11 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 697c99e6b481146b77bec71c8171ad1c2f02f26b..4f471098579f4a11ff6f5e9e4b2adc1c168839a2 100644
--- a/chrome/renderer/autofill/password_generation_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
@@ -332,8 +332,8 @@ TEST_F(PasswordGenerationAgentTest, FillTest) {
password_generation_->GeneratedPasswordAccepted(password);
// Password fields are filled out and set as being autofilled.
- EXPECT_EQ(password, first_password_element.value());
- EXPECT_EQ(password, second_password_element.value());
+ EXPECT_EQ(password, first_password_element.value().utf16());
+ EXPECT_EQ(password, second_password_element.value().utf16());
EXPECT_TRUE(first_password_element.isAutofilled());
EXPECT_TRUE(second_password_element.isAutofilled());
@@ -378,24 +378,24 @@ TEST_F(PasswordGenerationAgentTest, EditingTest) {
password_generation_->GeneratedPasswordAccepted(password);
// Passwords start out the same.
- EXPECT_EQ(password, first_password_element.value());
- EXPECT_EQ(password, second_password_element.value());
+ EXPECT_EQ(password, first_password_element.value().utf16());
+ EXPECT_EQ(password, second_password_element.value().utf16());
// After editing the first field they are still the same.
std::string edited_password_ascii = "edited_password";
SimulateUserInputChangeForElement(&first_password_element,
edited_password_ascii);
base::string16 edited_password = base::ASCIIToUTF16(edited_password_ascii);
- EXPECT_EQ(edited_password, first_password_element.value());
- EXPECT_EQ(edited_password, second_password_element.value());
+ EXPECT_EQ(edited_password, first_password_element.value().utf16());
+ EXPECT_EQ(edited_password, second_password_element.value().utf16());
fake_driver_.reset_called_password_no_longer_generated();
// Verify that password mirroring works correctly even when the password
// is deleted.
SimulateUserInputChangeForElement(&first_password_element, std::string());
- EXPECT_EQ(base::string16(), first_password_element.value());
- EXPECT_EQ(base::string16(), second_password_element.value());
+ EXPECT_EQ(base::string16(), first_password_element.value().utf16());
+ EXPECT_EQ(base::string16(), second_password_element.value().utf16());
// Should have notified the browser that the password is no longer generated
// and trigger generation again.

Powered by Google App Engine
This is Rietveld 408576698