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

Side by Side Diff: components/translate/core/browser/translate_browser_metrics_unittest.cc

Issue 1549993003: Switch to standard integer types in components/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/translate/core/browser/translate_browser_metrics.h" 5 #include "components/translate/core/browser/translate_browser_metrics.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/histogram_samples.h" 10 #include "base/metrics/histogram_samples.h"
11 #include "base/metrics/statistics_recorder.h" 11 #include "base/metrics/statistics_recorder.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "testing/platform_test.h" 13 #include "testing/platform_test.h"
14 14
15 using base::HistogramBase; 15 using base::HistogramBase;
16 using base::HistogramSamples; 16 using base::HistogramSamples;
17 using base::StatisticsRecorder; 17 using base::StatisticsRecorder;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 const int ENGLISH = 25966; 207 const int ENGLISH = 25966;
208 208
209 MetricsRecorder recorder(translate::TranslateBrowserMetrics::GetMetricsName( 209 MetricsRecorder recorder(translate::TranslateBrowserMetrics::GetMetricsName(
210 translate::TranslateBrowserMetrics:: 210 translate::TranslateBrowserMetrics::
211 UMA_UNSUPPORTED_LANGUAGE_AT_INITIATION)); 211 UMA_UNSUPPORTED_LANGUAGE_AT_INITIATION));
212 EXPECT_EQ(0, recorder.GetTotalCount()); 212 EXPECT_EQ(0, recorder.GetTotalCount());
213 translate::TranslateBrowserMetrics::ReportUnsupportedLanguageAtInitiation( 213 translate::TranslateBrowserMetrics::ReportUnsupportedLanguageAtInitiation(
214 "en"); 214 "en");
215 EXPECT_EQ(1, recorder.GetCount(ENGLISH)); 215 EXPECT_EQ(1, recorder.GetCount(ENGLISH));
216 } 216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698