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

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

Issue 23097007: Create variations target that depends on base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/statistics_recorder.h" 9 #include "base/metrics/statistics_recorder.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
11 #include "chrome/common/metrics/variations/variations_associated_data.h" 11 #include "components/variations/variations_associated_data.h"
12 #include "content/public/browser/user_metrics.h" 12 #include "content/public/browser/user_metrics.h"
13 13
14 namespace { 14 namespace {
15 15
16 // The tests that are run by this extension are expected to record the following 16 // The tests that are run by this extension are expected to record the following
17 // user actions, with the specified counts. If the tests in test.js are 17 // user actions, with the specified counts. If the tests in test.js are
18 // modified, this array may need to be updated. 18 // modified, this array may need to be updated.
19 struct RecordedUserAction { 19 struct RecordedUserAction {
20 const char* name; 20 const char* name;
21 int count; // number of times the metric was recorded. 21 int count; // number of times the metric was recorded.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 params["a"] = "aa"; 134 params["a"] = "aa";
135 params["b"] = "bb"; 135 params["b"] = "bb";
136 ASSERT_TRUE(chrome_variations::AssociateVariationParams( 136 ASSERT_TRUE(chrome_variations::AssociateVariationParams(
137 "apitestfieldtrial2", "group1", params)); 137 "apitestfieldtrial2", "group1", params));
138 138
139 ASSERT_TRUE(RunComponentExtensionTest("metrics")) << message_; 139 ASSERT_TRUE(RunComponentExtensionTest("metrics")) << message_;
140 140
141 observer.ValidateUserActions(g_user_actions, arraysize(g_user_actions)); 141 observer.ValidateUserActions(g_user_actions, arraysize(g_user_actions));
142 ValidateHistograms(g_histograms, arraysize(g_histograms)); 142 ValidateHistograms(g_histograms, arraysize(g_histograms));
143 } 143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698