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

Unified Diff: chrome/browser/chromeos/gdata/gdata_util_unittest.cc

Issue 10790124: chromeos: Add gdata::util::FormatTimeAsString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698