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

Unified Diff: src/platform/metrics/metrics_library_mock.h

Issue 2049007: Start transition the metrics library to non-static API. Use gmock in tests. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Break down tests to avoid explicit metrics lib mock checkpoints. Created 10 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
« no previous file with comments | « src/platform/metrics/metrics_library.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/metrics/metrics_library_mock.h
diff --git a/src/platform/metrics/metrics_library_mock.h b/src/platform/metrics/metrics_library_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..ffc934295d311fa92ac06ce56ce81979b6e174d9
--- /dev/null
+++ b/src/platform/metrics/metrics_library_mock.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 The Chromium OS 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 METRICS_LIBRARY_MOCK_H_
+#define METRICS_LIBRARY_MOCK_H_
+
+#include <string>
+
+#include "metrics_library.h"
+
+#include <gmock/gmock.h>
+
+class MetricsLibraryMock : public MetricsLibraryInterface {
+ public:
+ MOCK_METHOD0(Init, void());
+ MOCK_METHOD5(SendToUMA, bool(const std::string& name, int sample,
+ int min, int max, int nbuckets));
+ MOCK_METHOD3(SendEnumToUMA, bool(const std::string& name, int sample,
+ int max));
+};
+
+#endif /* METRICS_LIBRARY_MOCK_H_ */
« no previous file with comments | « src/platform/metrics/metrics_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698