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

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

Issue 316243002: Add date_synced to PasswordForm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 6 years, 6 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/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 394d06c6813f8cff427c37d395e72bbf4c370f64..cf8f22147f87d10f50823f0bb103f5f1945a54b4 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/prefs/pref_service.h"
#include "base/stl_util.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -304,6 +305,7 @@ void CheckPasswordChanges(const PasswordStoreChangeList& expected_list,
EXPECT_EQ(expected.type, actual.type);
EXPECT_EQ(expected.times_used, actual.times_used);
EXPECT_EQ(expected.scheme, actual.scheme);
+ EXPECT_EQ(expected.date_synced, actual.date_synced);
}
}
@@ -336,6 +338,7 @@ class NativeBackendGnomeTest : public testing::Test {
form_google_.signon_realm = "http://www.google.com/";
form_google_.type = PasswordForm::TYPE_GENERATED;
form_google_.date_created = base::Time::Now();
+ form_google_.date_synced = base::Time::Now();
form_facebook_.origin = GURL("http://www.facebook.com/");
form_facebook_.action = GURL("http://www.facebook.com/login");
@@ -346,6 +349,7 @@ class NativeBackendGnomeTest : public testing::Test {
form_facebook_.submit_element = UTF8ToUTF16("submit");
form_facebook_.signon_realm = "http://www.facebook.com/";
form_facebook_.date_created = base::Time::Now();
+ form_facebook_.date_synced = base::Time::Now();
form_isc_.origin = GURL("http://www.isc.org/");
form_isc_.action = GURL("http://www.isc.org/auth");
@@ -356,12 +360,14 @@ class NativeBackendGnomeTest : public testing::Test {
form_isc_.submit_element = UTF8ToUTF16("login");
form_isc_.signon_realm = "http://www.isc.org/";
form_isc_.date_created = base::Time::Now();
+ form_isc_.date_synced = base::Time::Now();
other_auth_.origin = GURL("http://www.example.com/");
other_auth_.username_value = UTF8ToUTF16("username");
other_auth_.password_value = UTF8ToUTF16("pass");
other_auth_.signon_realm = "http://www.example.com/Realm";
other_auth_.date_created = base::Time::Now();
+ other_auth_.date_synced = base::Time::Now();
}
virtual void TearDown() {
@@ -417,7 +423,7 @@ class NativeBackendGnomeTest : public testing::Test {
EXPECT_EQ("login", item->keyring);
EXPECT_EQ(form.origin.spec(), item->display_name);
EXPECT_EQ(UTF16ToUTF8(form.password_value), item->password);
- EXPECT_EQ(15u, item->attributes.size());
+ EXPECT_EQ(16u, item->attributes.size());
CheckStringAttribute(item, "origin_url", form.origin.spec());
CheckStringAttribute(item, "action_url", form.action.spec());
CheckStringAttribute(item, "username_element",
@@ -437,6 +443,8 @@ class NativeBackendGnomeTest : public testing::Test {
CheckUint32Attribute(item, "times_used", form.times_used);
CheckUint32Attribute(item, "scheme", form.scheme);
CheckStringAttribute(item, "application", app_string);
+ CheckStringAttribute(item, "date_synced", base::Int64ToString(
+ form.date_synced.ToInternalValue()));
}
// Saves |credentials| and then gets logins matching |url| and |scheme|.
« no previous file with comments | « chrome/browser/password_manager/native_backend_gnome_x.cc ('k') | chrome/browser/password_manager/native_backend_kwallet_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698