summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/thumbnail_database_unittest.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-05 22:33:17 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-05 22:33:17 +0000
commitff2dd6098ad664d4eae82cf334b3a872b576f18b (patch)
tree7634e868dc5fe03a7f0d4c37e73cc64a0ad3ee33 /chrome/browser/history/thumbnail_database_unittest.cc
parenta5f1862072501b117530546e9e9bb5c1f70eb049 (diff)
downloadchromium_src-ff2dd6098ad664d4eae82cf334b3a872b576f18b.zip
chromium_src-ff2dd6098ad664d4eae82cf334b3a872b576f18b.tar.gz
chromium_src-ff2dd6098ad664d4eae82cf334b3a872b576f18b.tar.bz2
Update thumbnail_database to store times using ToInternalValue().
Modify ThumbnailScore::Equals() to test whether the time_at_snapshot match exactly. BUG=None Test=ThumbnailDatabaseTest.* ThumbnailScoreTest.* pass Review URL: https://chromiumcodereview.appspot.com/10915092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/thumbnail_database_unittest.cc')
-rw-r--r--chrome/browser/history/thumbnail_database_unittest.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc
index 0c55e5e..7aab0a9 100644
--- a/chrome/browser/history/thumbnail_database_unittest.cc
+++ b/chrome/browser/history/thumbnail_database_unittest.cc
@@ -167,7 +167,8 @@ TEST_F(ThumbnailDatabaseTest, GetFaviconAfterMigrationToTopSites) {
EXPECT_EQ(bitmap1_id, favicon_bitmap1.bitmap_id);
EXPECT_EQ(icon_id, favicon_bitmap1.icon_id);
- EXPECT_EQ(time.ToTimeT(), favicon_bitmap1.last_updated.ToTimeT());
+ EXPECT_EQ(time.ToInternalValue(),
+ favicon_bitmap1.last_updated.ToInternalValue());
EXPECT_EQ(data.size(), favicon_bitmap1.bitmap_data->size());
EXPECT_TRUE(std::equal(data.begin(),
data.end(),
@@ -176,7 +177,8 @@ TEST_F(ThumbnailDatabaseTest, GetFaviconAfterMigrationToTopSites) {
EXPECT_EQ(bitmap2_id, favicon_bitmap2.bitmap_id);
EXPECT_EQ(icon_id, favicon_bitmap2.icon_id);
- EXPECT_EQ(time.ToTimeT(), favicon_bitmap2.last_updated.ToTimeT());
+ EXPECT_EQ(time.ToInternalValue(),
+ favicon_bitmap2.last_updated.ToInternalValue());
EXPECT_EQ(data.size(), favicon_bitmap2.bitmap_data->size());
EXPECT_TRUE(std::equal(data.begin(),
data.end(),
@@ -392,7 +394,7 @@ TEST_F(ThumbnailDatabaseTest, UpgradeToVersion6) {
int favicon_id = 1;
GURL url("http://google.com");
- time_t last_updated = Time::Now().ToTimeT();
+ int64 last_updated = Time::Now().ToInternalValue();
std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1));
scoped_refptr<base::RefCountedBytes> bitmap_data(
new base::RefCountedBytes(data));