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

Side by Side Diff: chrome/browser/accessibility/browser_accessibility_state_browsertest.cc

Issue 379283002: Rework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/test/histogram_tester.h"
5 #include "content/public/browser/browser_accessibility_state.h" 6 #include "content/public/browser/browser_accessibility_state.h"
6 #include "chrome/test/base/in_process_browser_test.h" 7 #include "chrome/test/base/in_process_browser_test.h"
7 #include "chrome/test/base/uma_histogram_helper.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 // Note: even though BrowserAccessibilityStateImpl is in content, this 11 // Note: even though BrowserAccessibilityStateImpl is in content, this
12 // test should be in Chrome because otherwise the Chrome-OS-specific 12 // test should be in Chrome because otherwise the Chrome-OS-specific
13 // histograms won't get updated. 13 // histograms won't get updated.
14 class BrowserAccessibilityStateImplTest : public InProcessBrowserTest { 14 class BrowserAccessibilityStateImplTest : public InProcessBrowserTest {
15 }; 15 };
16 16
17 IN_PROC_BROWSER_TEST_F(BrowserAccessibilityStateImplTest, TestHistograms) { 17 IN_PROC_BROWSER_TEST_F(BrowserAccessibilityStateImplTest, TestHistograms) {
18 UMAHistogramHelper histograms; 18 base::HistogramTester histograms;
19 19
20 BrowserAccessibilityState::GetInstance()->UpdateHistogramsForTesting(); 20 BrowserAccessibilityState::GetInstance()->UpdateHistogramsForTesting();
21 histograms.Fetch();
22 histograms.ExpectTotalCount("Accessibility.State", 1); 21 histograms.ExpectTotalCount("Accessibility.State", 1);
23 #if defined(OS_WIN) 22 #if defined(OS_WIN)
24 histograms.ExpectTotalCount("Accessibility.WinScreenReader", 1); 23 histograms.ExpectTotalCount("Accessibility.WinScreenReader", 1);
25 #elif defined(OS_CHROMEOS) 24 #elif defined(OS_CHROMEOS)
26 histograms.ExpectTotalCount("Accessibility.CrosSpokenFeedback", 1); 25 histograms.ExpectTotalCount("Accessibility.CrosSpokenFeedback", 1);
27 #endif 26 #endif
28 } 27 }
29 28
30 } // namespace content 29 } // namespace content
OLDNEW
« no previous file with comments | « base/test/statistics_delta_reader_unittest.cc ('k') | chrome/browser/chromeos/external_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698