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

Unified Diff: chrome/browser/sync/util/data_type_histogram_unittest.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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/sync/util/data_type_histogram.h ('k') | chrome/browser/sync/util/encryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/util/data_type_histogram_unittest.cc
diff --git a/chrome/browser/sync/util/data_type_histogram_unittest.cc b/chrome/browser/sync/util/data_type_histogram_unittest.cc
deleted file mode 100644
index 6b7547ef42932eb8a2a81fb4e0cd2856964cc4c1..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/util/data_type_histogram_unittest.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 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/sync/util/data_type_histogram.h"
-
-#include "base/time.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace browser_sync {
-namespace {
-
-class DataTypeHistogramTest : public testing::Test {
-};
-
-// Create a histogram of type HISTOGRAM_COUNTS for each model type. Nothing
-// should break.
-TEST(DataTypeHistogramTest, BasicCount) {
- for (int i = syncable::FIRST_REAL_MODEL_TYPE;
- i <= syncable::LAST_REAL_MODEL_TYPE; ++i) {
- syncable::ModelType type = syncable::ModelTypeFromInt(i);
-#define PER_DATA_TYPE_MACRO(type_str) \
- HISTOGRAM_COUNTS("Prefix" type_str "Suffix", 1);
- SYNC_DATA_TYPE_HISTOGRAM(type);
-#undef PER_DATA_TYPE_MACRO
- }
-}
-
-// Create a histogram of type SYNC_FREQ_HISTOGRAM for each model type. Nothing
-// should break.
-TEST(DataTypeHistogramTest, BasicFreq) {
- for (int i = syncable::FIRST_REAL_MODEL_TYPE;
- i <= syncable::LAST_REAL_MODEL_TYPE; ++i) {
- syncable::ModelType type = syncable::ModelTypeFromInt(i);
-#define PER_DATA_TYPE_MACRO(type_str) \
- SYNC_FREQ_HISTOGRAM("Prefix" type_str "Suffix", \
- base::TimeDelta::FromSeconds(1));
- SYNC_DATA_TYPE_HISTOGRAM(type);
-#undef PER_DATA_TYPE_MACRO
- }
-}
-
-// Create a histogram of type UMA_HISTOGRAM_ENUMERATION for each model type.
-// Nothing should break.
-TEST(DataTypeHistogramTest, BasicEnum) {
- enum HistTypes {
- TYPE_1,
- TYPE_2,
- TYPE_COUNT,
- };
- for (int i = syncable::FIRST_REAL_MODEL_TYPE;
- i <= syncable::LAST_REAL_MODEL_TYPE; ++i) {
- syncable::ModelType type = syncable::ModelTypeFromInt(i);
-#define PER_DATA_TYPE_MACRO(type_str) \
- UMA_HISTOGRAM_ENUMERATION("Prefix" type_str "Suffix", \
- (i % 2 ? TYPE_1 : TYPE_2), TYPE_COUNT);
- SYNC_DATA_TYPE_HISTOGRAM(type);
-#undef PER_DATA_TYPE_MACRO
- }
-}
-
-} // namespace
-} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/util/data_type_histogram.h ('k') | chrome/browser/sync/util/encryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698