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

Side by Side Diff: chrome/browser/extensions/api/metrics/metrics_apitest.cc

Issue 10703037: Move StatisticsRecorder out of histogram.cc/h for further refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/metrics/statistics_recorder.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
10 #include "content/public/browser/notification_service.h" 11 #include "content/public/browser/notification_service.h"
11 12
12 namespace { 13 namespace {
13 14
14 // The tests that are run by this extension are expected to record the following 15 // The tests that are run by this extension are expected to record the following
15 // user actions, with the specified counts. If the tests in test.js are 16 // user actions, with the specified counts. If the tests in test.js are
16 // modified, this array may need to be updated. 17 // modified, this array may need to be updated.
17 struct RecordedUserAction { 18 struct RecordedUserAction {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } // anonymous namespace 124 } // anonymous namespace
124 125
125 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Metrics) { 126 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Metrics) {
126 UserActionObserver observer; 127 UserActionObserver observer;
127 128
128 ASSERT_TRUE(RunComponentExtensionTest("metrics")) << message_; 129 ASSERT_TRUE(RunComponentExtensionTest("metrics")) << message_;
129 130
130 observer.ValidateUserActions(g_user_actions, arraysize(g_user_actions)); 131 observer.ValidateUserActions(g_user_actions, arraysize(g_user_actions));
131 ValidateHistograms(g_histograms, arraysize(g_histograms)); 132 ValidateHistograms(g_histograms, arraysize(g_histograms));
132 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_application_mac_unittest.mm ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698