From 30fdb36651388788b318cde3e9e86c29fd2bd79b Mon Sep 17 00:00:00 2001 From: "dmazzoni@chromium.org" Date: Wed, 9 Jan 2013 02:33:27 +0000 Subject: Add test for accessibility histograms. The goal is just to make sure this code has test coverage, not to test correctness. There was an issue in the past where the code that computed the histograms crashed in debug mode, this will help prevent something like that from landing in the future. BUG=99504 Review URL: https://chromiumcodereview.appspot.com/11778045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175677 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/accessibility/browser_accessibility_state_impl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'content/browser/accessibility/browser_accessibility_state_impl.h') diff --git a/content/browser/accessibility/browser_accessibility_state_impl.h b/content/browser/accessibility/browser_accessibility_state_impl.h index 40d99fd..46621ea 100644 --- a/content/browser/accessibility/browser_accessibility_state_impl.h +++ b/content/browser/accessibility/browser_accessibility_state_impl.h @@ -45,9 +45,7 @@ class CONTENT_EXPORT BrowserAccessibilityStateImpl virtual bool IsAccessibleBrowser() OVERRIDE; virtual void AddHistogramCallback(base::Closure callback) OVERRIDE; - // Called a short while after startup to allow time for the accessibility - // state to be determined. Updates a histogram with the current state. - void UpdateHistogram(); + virtual void UpdateHistogramsForTesting() OVERRIDE; AccessibilityMode GetAccessibilityMode(); void SetAccessibilityMode(AccessibilityMode mode); @@ -56,6 +54,10 @@ class CONTENT_EXPORT BrowserAccessibilityStateImpl friend class base::RefCountedThreadSafe; friend struct DefaultSingletonTraits; + // Called a short while after startup to allow time for the accessibility + // state to be determined. Updates histograms with the current state. + void UpdateHistograms(); + // Leaky singleton, destructor generally won't be called. virtual ~BrowserAccessibilityStateImpl(); -- cgit v1.1