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

Unified Diff: chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc

Issue 1892613006: Add functions to the passwords private api that update the lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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/browser/extensions/api/passwords_private/passwords_private_apitest.cc
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc
index 50c98b486614226668e12c27882d769886cfa805..d24bbe3052b32de31bbfb076a2a23286e97ccc3b 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc
@@ -72,6 +72,11 @@ class TestDelegate : public PasswordsPrivateDelegate {
router->OnSavedPasswordsListChanged(current_entries_);
}
+ const std::vector<api::passwords_private::PasswordUiEntry>*
+ GetSavedPasswordsList() const override {
+ return &current_entries_;
+ }
+
void SendPasswordExceptionsList() override {
PasswordsPrivateEventRouter* router =
PasswordsPrivateEventRouterFactory::GetForProfile(profile_);
@@ -79,6 +84,10 @@ class TestDelegate : public PasswordsPrivateDelegate {
router->OnPasswordExceptionsListChanged(current_exceptions_);
}
+ const std::vector<std::string>* GetPasswordExceptionsList() const override {
+ return &current_exceptions_;
+ }
+
void RemoveSavedPassword(
const std::string& origin_url, const std::string& username) override {
if (!current_entries_.size())
@@ -185,4 +194,12 @@ IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, RequestPlaintextPassword) {
EXPECT_TRUE(RunPasswordsSubtest("requestPlaintextPassword")) << message_;
}
+IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, GetSavedPasswordList) {
+ EXPECT_TRUE(RunPasswordsSubtest("getSavedPasswordList")) << message_;
+}
+
+IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, GetPasswordExceptionList) {
+ EXPECT_TRUE(RunPasswordsSubtest("getPasswordExceptionList")) << message_;
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698