Chromium Code Reviews| 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 60bdaa3efa8a9c77e86dc2d7997968038f342b55..01d45ac2cb20ac66b406e8a2a6e7de3609d1afd6 100644 |
| --- a/chrome/renderer/autofill/password_generation_agent_browsertest.cc |
| +++ b/chrome/renderer/autofill/password_generation_agent_browsertest.cc |
| @@ -200,8 +200,9 @@ TEST_F(PasswordGenerationAgentTest, EditingTest) { |
| base::string16 edited_password = base::ASCIIToUTF16("edited_password"); |
| first_password_element.setValue(edited_password); |
| // Cast to WebAutofillClient where textFieldDidChange() is public. |
| - static_cast<blink::WebAutofillClient*>(autofill_agent_)->textFieldDidChange( |
| - first_password_element); |
| + AutofillAgent* autofill_agent = (AutofillAgent*)autofill_agent_; |
|
vabr (Chromium)
2014/09/15 14:26:59
Don't use C-style cast, use one of C++ casts. (htt
Pritam Nikam
2014/09/16 07:54:19
Done.
I've missed including header earlier.
|
| + static_cast<blink::WebAutofillClient*>(autofill_agent) |
| + ->textFieldDidChange(first_password_element); |
| // textFieldDidChange posts a task, so we need to wait until it's been |
| // processed. |
| base::MessageLoop::current()->RunUntilIdle(); |
| @@ -272,8 +273,9 @@ TEST_F(PasswordGenerationAgentTest, MaximumOfferSize) { |
| base::ASCIIToUTF16( |
| std::string(password_generation_->kMaximumOfferSize - 1, 'a'))); |
| // Cast to WebAutofillClient where textFieldDidChange() is public. |
| - static_cast<blink::WebAutofillClient*>(autofill_agent_)->textFieldDidChange( |
| - first_password_element); |
| + AutofillAgent* autofill_agent = (AutofillAgent*)autofill_agent_; |
| + static_cast<blink::WebAutofillClient*>(autofill_agent) |
| + ->textFieldDidChange(first_password_element); |
| // textFieldDidChange posts a task, so we need to wait until it's been |
| // processed. |
| base::MessageLoop::current()->RunUntilIdle(); |
| @@ -288,8 +290,8 @@ TEST_F(PasswordGenerationAgentTest, MaximumOfferSize) { |
| base::ASCIIToUTF16( |
| std::string(password_generation_->kMaximumOfferSize + 1, 'a'))); |
| // Cast to WebAutofillClient where textFieldDidChange() is public. |
| - static_cast<blink::WebAutofillClient*>(autofill_agent_)->textFieldDidChange( |
| - first_password_element); |
| + static_cast<blink::WebAutofillClient*>(autofill_agent) |
| + ->textFieldDidChange(first_password_element); |
| // textFieldDidChange posts a task, so we need to wait until it's been |
| // processed. |
| base::MessageLoop::current()->RunUntilIdle(); |
| @@ -305,8 +307,8 @@ TEST_F(PasswordGenerationAgentTest, MaximumOfferSize) { |
| base::ASCIIToUTF16( |
| std::string(password_generation_->kMaximumOfferSize, 'a'))); |
| // Cast to WebAutofillClient where textFieldDidChange() is public. |
| - static_cast<blink::WebAutofillClient*>(autofill_agent_)->textFieldDidChange( |
| - first_password_element); |
| + static_cast<blink::WebAutofillClient*>(autofill_agent) |
| + ->textFieldDidChange(first_password_element); |
| // textFieldDidChange posts a task, so we need to wait until it's been |
| // processed. |
| base::MessageLoop::current()->RunUntilIdle(); |