Index: chrome/browser/chromeos/gdata/gdata_util_unittest.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_util_unittest.cc b/chrome/browser/chromeos/gdata/gdata_util_unittest.cc |
index c37df86dcdbb96c0d168d7382a8b48e599c701e7..e18c65c39f474ac2f75599df38386f4ee6022b40 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_util_unittest.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_util_unittest.cc |
@@ -6,6 +6,7 @@ |
#include "base/file_path.h" |
#include "base/i18n/time_formatting.h" |
+#include "base/stringprintf.h" |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/chromeos/system/timezone_settings.h" |
@@ -14,7 +15,6 @@ |
namespace gdata { |
namespace util { |
- |
namespace { |
std::string FormatTime(const base::Time& time) { |
@@ -171,5 +171,11 @@ TEST(GDataUtilTest, GetTimeFromString) { |
FormatTime(test_time)); |
} |
+TEST(GDataUtilTest, FormatTimeAsString) { |
+ base::Time::Exploded exploded_time = {2012, 7, 0, 19, 15, 59, 13, 123}; |
+ base::Time time = base::Time::FromUTCExploded(exploded_time); |
+ EXPECT_EQ("2012-07-19T15:59:13.123Z", FormatTimeAsString(time)); |
+} |
+ |
} // namespace util |
} // namespace gdata |