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

Unified Diff: chrome/browser/chromeos/drive/event_logger_unittest.cc

Issue 14247011: drive: Change EventLogger to take printf format (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/drive/event_logger.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/drive/event_logger_unittest.cc
diff --git a/chrome/browser/chromeos/drive/event_logger_unittest.cc b/chrome/browser/chromeos/drive/event_logger_unittest.cc
index 565050aec2d0342db8a156582c72ac85d51c3a25..224992187ac399f518f38fade659ba99d912b413 100644
--- a/chrome/browser/chromeos/drive/event_logger_unittest.cc
+++ b/chrome/browser/chromeos/drive/event_logger_unittest.cc
@@ -8,33 +8,33 @@
namespace drive {
-TEST(DriveEventLoggerTest, BasicLogging) {
+TEST(EventLoggerTest, BasicLogging) {
EventLogger logger(3); // At most 3 events are kept.
EXPECT_EQ(0U, logger.history().size());
logger.Log("first");
- logger.Log("second");
+ logger.Log("%dnd", 2);
logger.Log("third");
// Events are recorded in the chronological order with sequential IDs.
ASSERT_EQ(3U, logger.history().size());
EXPECT_EQ(0, logger.history()[0].id);
- EXPECT_EQ(std::string("first"), logger.history()[0].what);
+ EXPECT_EQ("first", logger.history()[0].what);
EXPECT_EQ(1, logger.history()[1].id);
- EXPECT_EQ(std::string("second"), logger.history()[1].what);
+ EXPECT_EQ("2nd", logger.history()[1].what);
EXPECT_EQ(2, logger.history()[2].id);
- EXPECT_EQ(std::string("third"), logger.history()[2].what);
+ EXPECT_EQ("third", logger.history()[2].what);
logger.Log("fourth");
// It does not log events beyond the specified.
ASSERT_EQ(3U, logger.history().size());
// The oldest events is pushed out.
EXPECT_EQ(1, logger.history()[0].id);
- EXPECT_EQ(std::string("second"), logger.history()[0].what);
+ EXPECT_EQ("2nd", logger.history()[0].what);
EXPECT_EQ(2, logger.history()[1].id);
- EXPECT_EQ(std::string("third"), logger.history()[1].what);
+ EXPECT_EQ("third", logger.history()[1].what);
EXPECT_EQ(3, logger.history()[2].id);
- EXPECT_EQ(std::string("fourth"), logger.history()[2].what);
+ EXPECT_EQ("fourth", logger.history()[2].what);
}
} // namespace drive
« no previous file with comments | « chrome/browser/chromeos/drive/event_logger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698