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

Unified Diff: chrome/browser/password_manager/native_backend_gnome_x_unittest.cc

Issue 536783002: [Password Manager] Remove action match requirement for RemoveLogin() on Gnome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/password_manager/native_backend_gnome_x.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
diff --git a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
index 5de4972a4ada113ae85dc5d24083af4f1358e610..c5f28c485acccda8bf3f6997c6cc71f5f813fe32 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -912,6 +912,35 @@ TEST_F(NativeBackendGnomeTest, BasicRemoveLogin) {
EXPECT_EQ(0u, mock_keyring_items.size());
}
+// Verify fix for http://crbug.com/408783.
+TEST_F(NativeBackendGnomeTest, RemoveLoginActionMismatch) {
+ NativeBackendGnome backend(42);
+ backend.Init();
+
+ BrowserThread::PostTask(
+ BrowserThread::DB, FROM_HERE,
+ base::Bind(base::IgnoreResult(&NativeBackendGnome::AddLogin),
+ base::Unretained(&backend), form_google_));
+
+ RunBothThreads();
+
+ EXPECT_EQ(1u, mock_keyring_items.size());
+ if (mock_keyring_items.size() > 0)
+ CheckMockKeyringItem(&mock_keyring_items[0], form_google_, "chrome-42");
+
+ // Action url match not required for removal.
+ form_google_.action = GURL("https://some.other.url.com/path");
+
+ BrowserThread::PostTask(
+ BrowserThread::DB, FROM_HERE,
+ base::Bind(base::IgnoreResult(&NativeBackendGnome::RemoveLogin),
+ base::Unretained(&backend), form_google_));
+
+ RunBothThreads();
+
+ EXPECT_EQ(0u, mock_keyring_items.size());
+}
+
TEST_F(NativeBackendGnomeTest, RemoveNonexistentLogin) {
NativeBackendGnome backend(42);
backend.Init();
« no previous file with comments | « chrome/browser/password_manager/native_backend_gnome_x.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698