| Index: chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
|
| diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
|
| index 814931ae7467820efa4cc18d4a11996403433a4c..8aeeb662f0c7c6595138a4de65507c197fdac83b 100644
|
| --- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
|
| +++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
|
| @@ -87,6 +87,8 @@ class MockPasswordProtectionService
|
| MOCK_METHOD0(IsHistorySyncEnabled, bool());
|
| MOCK_METHOD3(MaybeStartPasswordFieldOnFocusRequest,
|
| void(const GURL&, const GURL&, const GURL&));
|
| + MOCK_METHOD2(MaybeStartProtectedPasswordEntryRequest,
|
| + void(const GURL&, const std::string&));
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(MockPasswordProtectionService);
|
| @@ -622,4 +624,18 @@ TEST_F(ChromePasswordManagerClientTest,
|
| client->CheckSafeBrowsingReputation(GURL("http://foo.com/submit"),
|
| GURL("http://foo.com/iframe.html"));
|
| }
|
| +
|
| +TEST_F(ChromePasswordManagerClientTest,
|
| + VerifyMaybeProtectedPasswordEntryRequestCalled) {
|
| + std::unique_ptr<WebContents> test_web_contents(
|
| + content::WebContentsTester::CreateTestWebContents(
|
| + web_contents()->GetBrowserContext(), nullptr));
|
| + std::unique_ptr<MockChromePasswordManagerClient> client(
|
| + new MockChromePasswordManagerClient(test_web_contents.get()));
|
| + EXPECT_CALL(*client->password_protection_service(),
|
| + MaybeStartProtectedPasswordEntryRequest(_, _))
|
| + .Times(1);
|
| + client->CheckProtectedPasswordEntry(std::string("saved_domain.com"));
|
| +}
|
| +
|
| #endif
|
|
|