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

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

Issue 895653002: Serialize date_created in PasswordStoreX properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 4ba35ff0586ef8010d32826c3820212919be4105..8a1c29624e08ed0d59bc683b206609b9fa9da3d4 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -298,8 +298,7 @@ void CheckPasswordChanges(const PasswordStoreChangeList& expected_list,
EXPECT_EQ(expected.signon_realm, actual.signon_realm);
EXPECT_EQ(expected.ssl_valid, actual.ssl_valid);
EXPECT_EQ(expected.preferred, actual.preferred);
- // We don't check the date created. It varies due to bug in the
- // serialization. Integer seconds are saved instead of microseconds.
+ EXPECT_EQ(expected.date_created, actual.date_created);
EXPECT_EQ(expected.blacklisted_by_user, actual.blacklisted_by_user);
EXPECT_EQ(expected.type, actual.type);
EXPECT_EQ(expected.times_used, actual.times_used);
@@ -663,15 +662,13 @@ class NativeBackendGnomeTest : public testing::Test {
NativeBackendGnome backend(42);
backend.Init();
- form_google_.date_synced = base::Time();
- form_isc_.date_synced = base::Time();
- form_google_.date_created = base::Time();
- form_isc_.date_created = base::Time();
base::Time now = base::Time::Now();
base::Time next_day = now + base::TimeDelta::FromDays(1);
+ form_google_.date_synced = base::Time();
+ form_isc_.date_synced = base::Time();
+ form_google_.date_created = now;
+ form_isc_.date_created = now;
if (date_to_test == CREATED) {
- // crbug/374132. Remove the next line once it's fixed.
- next_day = base::Time::FromTimeT(next_day.ToTimeT());
form_google_.date_created = now;
form_isc_.date_created = next_day;
} else {
« 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