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

Unified Diff: chrome/common/metrics/metrics_log_base_unittest.cc

Issue 49753002: RAPPOR implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/common/metrics/metrics_log_base.cc ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/metrics/metrics_log_base_unittest.cc
diff --git a/chrome/common/metrics/metrics_log_base_unittest.cc b/chrome/common/metrics/metrics_log_base_unittest.cc
index 2a5834e25090542ee90fdde9074f8a6209462fa5..e092c5fbc3be3d7c642a892812e659338d526052 100644
--- a/chrome/common/metrics/metrics_log_base_unittest.cc
+++ b/chrome/common/metrics/metrics_log_base_unittest.cc
@@ -7,10 +7,8 @@
#include <string>
#include "base/base64.h"
-#include "base/format_macros.h"
#include "base/metrics/bucket_ranges.h"
#include "base/metrics/sample_vector.h"
-#include "base/strings/stringprintf.h"
#include "chrome/common/metrics/proto/chrome_user_metrics_extension.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -56,24 +54,6 @@ TEST(MetricsLogBaseTest, EmptyRecord) {
EXPECT_EQ(expected.SerializeAsString(), encoded);
}
-// Make sure our ID hashes are the same as what we see on the server side.
-TEST(MetricsLogBaseTest, Hashes) {
- static const struct {
- std::string input;
- std::string output;
- } cases[] = {
- {"Back", "0x0557fa923dcee4d0"},
- {"Forward", "0x67d2f6740a8eaebf"},
- {"NewTab", "0x290eb683f96572f1"},
- };
-
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
- uint64 hash = MetricsLogBase::Hash(cases[i].input);
- std::string hash_hex = base::StringPrintf("0x%016" PRIx64, hash);
- EXPECT_EQ(cases[i].output, hash_hex);
- }
-}
-
TEST(MetricsLogBaseTest, HistogramBucketFields) {
// Create buckets: 1-5, 5-7, 7-8, 8-9, 9-10, 10-11, 11-12.
base::BucketRanges ranges(8);
« no previous file with comments | « chrome/common/metrics/metrics_log_base.cc ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698