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

Unified Diff: components/drive/file_system/touch_operation_unittest.cc

Issue 2095553002: Make callers of FromUTC(Local)Exploded in components/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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: components/drive/file_system/touch_operation_unittest.cc
diff --git a/components/drive/file_system/touch_operation_unittest.cc b/components/drive/file_system/touch_operation_unittest.cc
index 8c15010a8b565a1003137808510b368cecb9c0a6..4cdebb9ecc71226aac5078559e8310660d58677b 100644
--- a/components/drive/file_system/touch_operation_unittest.cc
+++ b/components/drive/file_system/touch_operation_unittest.cc
@@ -32,19 +32,21 @@ TEST_F(TouchOperationTest, TouchFile) {
};
FileError error = FILE_ERROR_FAILED;
- operation.TouchFile(
- kTestPath,
- base::Time::FromUTCExploded(kLastAccessTime),
- base::Time::FromUTCExploded(kLastModifiedTime),
- google_apis::test_util::CreateCopyResultCallback(&error));
+ base::Time LastAccessTimeUTC;
+ base::Time LastModifiedTimeUTC;
+ EXPECT_TRUE(base::Time::FromUTCExploded(kLastAccessTime, &LastAccessTimeUTC));
+ EXPECT_TRUE(
+ base::Time::FromUTCExploded(kLastModifiedTime, &LastModifiedTimeUTC));
+ operation.TouchFile(kTestPath, LastAccessTimeUTC, LastModifiedTimeUTC,
+ google_apis::test_util::CreateCopyResultCallback(&error));
content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
ResourceEntry entry;
EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(kTestPath, &entry));
- EXPECT_EQ(base::Time::FromUTCExploded(kLastAccessTime),
+ EXPECT_EQ(LastAccessTimeUTC,
base::Time::FromInternalValue(entry.file_info().last_accessed()));
- EXPECT_EQ(base::Time::FromUTCExploded(kLastModifiedTime),
+ EXPECT_EQ(LastModifiedTimeUTC,
base::Time::FromInternalValue(entry.file_info().last_modified()));
EXPECT_EQ(ResourceEntry::DIRTY, entry.metadata_edit_state());

Powered by Google App Engine
This is Rietveld 408576698