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

Unified Diff: components/feature_engagement_tracker/internal/test/event_util.h

Issue 2876633002: Add a PersistentStore to FeatureEngagementTracker (Closed)
Patch Set: Fix deps Created 3 years, 7 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/feature_engagement_tracker/internal/test/event_util.h
diff --git a/components/feature_engagement_tracker/internal/test/event_util.h b/components/feature_engagement_tracker/internal/test/event_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..f4cc90ad49ba64d079a25fbc1818be35e9d7a167
--- /dev/null
+++ b/components/feature_engagement_tracker/internal/test/event_util.h
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_TEST_EVENT_UTIL_H_
+#define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_TEST_EVENT_UTIL_H_
+
+#include <stdint.h>
+
+namespace feature_engagement_tracker {
+
+class Event;
+
+namespace test {
+
+// Adds an Event count entry for |event|.
+void SetEventCountForDay(Event* event, uint32_t day, uint32_t count);
+
+// Verifies that the given |event| contains a |day| with the correct |count|,
+// and that the day only exists a single time.
+void VerifyEventCount(const Event* event, uint32_t day, uint32_t count);
+
+// Verifies that the event |a| and |b| contain the exact same data.
+void VerifyEventsEqual(const Event* a, const Event* b);
+
+} // namespace test
+} // namespace feature_engagement_tracker
+
+#endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_TEST_EVENT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698