Chromium Code Reviews| Index: chrome/renderer/autofill/password_generation_test_utils.cc |
| diff --git a/chrome/renderer/autofill/password_generation_test_utils.cc b/chrome/renderer/autofill/password_generation_test_utils.cc |
| index 1db160e5419a6283b42cbf043031b6dcadd4852c..0177122176ea48913901052cc2622619666d7203 100644 |
| --- a/chrome/renderer/autofill/password_generation_test_utils.cc |
| +++ b/chrome/renderer/autofill/password_generation_test_utils.cc |
| @@ -9,6 +9,8 @@ |
| #include "components/autofill/content/common/autofill_messages.h" |
| #include "components/autofill/content/renderer/form_autofill_util.h" |
| #include "components/autofill/content/renderer/test_password_generation_agent.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| +#include "third_party/WebKit/public/platform/WebString.h" |
|
please use gerrit instead
2015/06/16 00:53:23
Why this include?
Garrett Casto
2015/06/16 06:15:04
Leftover from an earlier iteration. Removed.
|
| #include "third_party/WebKit/public/web/WebDocument.h" |
| #include "third_party/WebKit/public/web/WebFormElement.h" |
| @@ -45,4 +47,17 @@ void SetAccountCreationFormsDetectedMessage( |
| generation_agent->OnMessageReceived(msg); |
| } |
| +void ExpectPasswordGenerationAvailable( |
| + TestPasswordGenerationAgent* password_generation, |
| + bool available) { |
| + if (available) { |
| + ASSERT_EQ(1u, password_generation->messages().size()); |
| + EXPECT_EQ(AutofillHostMsg_ShowPasswordGenerationPopup::ID, |
| + password_generation->messages()[0]->type()); |
| + } else { |
| + EXPECT_TRUE(password_generation->messages().empty()); |
| + } |
| + password_generation->clear_messages(); |
| +} |
| + |
| } // namespace autofill |