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

Unified Diff: components/metrics/persisted_logs_unittest.cc

Issue 2358223002: Add log date to the metrics log (Closed)
Patch Set: add deprectaed comments Created 4 years, 3 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 | « components/metrics/persisted_logs.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/persisted_logs_unittest.cc
diff --git a/components/metrics/persisted_logs_unittest.cc b/components/metrics/persisted_logs_unittest.cc
index b4a79a73ea626e9c02db9d0938bb987c4907d537..94b8b7e97ded09d981455a4f68a0039f88d60cd0 100644
--- a/components/metrics/persisted_logs_unittest.cc
+++ b/components/metrics/persisted_logs_unittest.cc
@@ -22,6 +22,7 @@ namespace metrics {
namespace {
const char kTestPrefName[] = "TestPref";
+const char kTestOutdatedPrefName[] = "OutdatedTestPref";
const size_t kLogCountLimit = 3;
const size_t kLogByteLimit = 1000;
@@ -63,9 +64,12 @@ class PersistedLogsTest : public testing::Test {
class TestPersistedLogs : public PersistedLogs {
public:
TestPersistedLogs(PrefService* service, size_t min_log_bytes)
- : PersistedLogs(service, kTestPrefName, kLogCountLimit, min_log_bytes,
- 0) {
- }
+ : PersistedLogs(service,
+ kTestPrefName,
+ kTestOutdatedPrefName,
+ kLogCountLimit,
+ min_log_bytes,
+ 0) {}
// Stages and removes the next log, while testing it's value.
void ExpectNextLog(const std::string& expected_log) {
@@ -111,6 +115,8 @@ TEST_F(PersistedLogsTest, SingleElementLogList) {
EXPECT_EQ(persisted_logs.staged_log(), result_persisted_logs.staged_log());
EXPECT_EQ(persisted_logs.staged_log_hash(),
result_persisted_logs.staged_log_hash());
+ EXPECT_EQ(persisted_logs.staged_log_timestamp(),
+ result_persisted_logs.staged_log_timestamp());
}
// Store a set of logs over the length limit, but smaller than the min number of
« no previous file with comments | « components/metrics/persisted_logs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698