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

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: fukino's comments Created 4 years, 5 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..49bbbe557838183dd6801a088b48a97744e47e3b 100644
--- a/components/drive/file_system/touch_operation_unittest.cc
+++ b/components/drive/file_system/touch_operation_unittest.cc
@@ -32,19 +32,22 @@ 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 last_access_time_utc;
+ base::Time last_modified_time_utc;
+ EXPECT_TRUE(
+ base::Time::FromUTCExploded(kLastAccessTime, &last_access_time_utc));
+ EXPECT_TRUE(
+ base::Time::FromUTCExploded(kLastModifiedTime, &last_modified_time_utc));
+ operation.TouchFile(kTestPath, last_access_time_utc, last_modified_time_utc,
+ 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(last_access_time_utc,
base::Time::FromInternalValue(entry.file_info().last_accessed()));
- EXPECT_EQ(base::Time::FromUTCExploded(kLastModifiedTime),
+ EXPECT_EQ(last_modified_time_utc,
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