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

Side by Side Diff: chrome/test/data/extensions/api_test/metrics/test.js

Issue 17496005: Add a private API method metricsPrivate.getFieldTrial(), which returns (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment. Created 7 years, 6 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
« no previous file with comments | « chrome/common/extensions/api/metrics_private.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // metrics api test 5 // metrics api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Metrics 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Metrics
7 7
8 // Any changes to the logging done in these functions should be matched 8 // Any changes to the logging done in these functions should be matched
9 // with the checks done in IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Metrics). 9 // with the checks done in IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Metrics).
10 // See metrics_apitest.cc. 10 // See metrics_apitest.cc.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 chrome.test.succeed(); 51 chrome.test.succeed();
52 }, 52 },
53 53
54 function recordCounts() { 54 function recordCounts() {
55 chrome.metricsPrivate.recordCount('test.count', 420000); 55 chrome.metricsPrivate.recordCount('test.count', 420000);
56 chrome.metricsPrivate.recordMediumCount('test.medium.count', 4200); 56 chrome.metricsPrivate.recordMediumCount('test.medium.count', 4200);
57 chrome.metricsPrivate.recordSmallCount('test.small.count', 42); 57 chrome.metricsPrivate.recordSmallCount('test.small.count', 42);
58 58
59 chrome.test.succeed(); 59 chrome.test.succeed();
60 },
61
62 function getFieldTrial() {
63 var test1Callback = function(group) {
64 chrome.test.assertEq('', group);
65 chrome.metricsPrivate.getFieldTrial('apitestfieldtrial2', test2Callback);
66 };
67
68 var test2Callback = function(group) {
69 chrome.test.assertEq('group1', group);
70 chrome.test.succeed();
71 };
72
73 chrome.metricsPrivate.getFieldTrial('apitestfieldtrial1', test1Callback);
60 } 74 }
61 ]); 75 ]);
62 76
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/metrics_private.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698