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

Unified Diff: chrome/browser/metrics/rappor/sampling_unittest.cc

Issue 311133006: Add more Rappor metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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/metrics/rappor/sampling.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/rappor/sampling_unittest.cc
diff --git a/chrome/browser/metrics/rappor/sampling_unittest.cc b/chrome/browser/metrics/rappor/sampling_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f0cb88448327e52485bd13560422b088241447e0
--- /dev/null
+++ b/chrome/browser/metrics/rappor/sampling_unittest.cc
@@ -0,0 +1,19 @@
+// Copyright 2014 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.
+
+#include "chrome/browser/metrics/rappor/sampling.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
+
+namespace rappor {
+
+// Make sure recording a sample during tests, when the Rappor service is NULL,
+// doesn't cause a crash.
+TEST(RapporSamplingTest, SmokeTest) {
+ SampleDomainAndRegistryFromHost(std::string(), std::string());
+ SampleDomainAndRegistryFromGURL(std::string(), GURL());
+}
+
+} // namespace rappor
« no previous file with comments | « chrome/browser/metrics/rappor/sampling.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698