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

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

Issue 10696145: Moving metrics to api/ . (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Putting back "using" and updating WATCHLISTS 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
« no previous file with comments | « chrome/chrome_tests.gypi ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 extension_metrics_apitest.cc. 10 // See metrics_apitest.cc.
11 chrome.test.runTests([ 11 chrome.test.runTests([
12 function recordUserAction() { 12 function recordUserAction() {
13 // Log a metric once. 13 // Log a metric once.
14 chrome.metricsPrivate.recordUserAction('test.ua.1'); 14 chrome.metricsPrivate.recordUserAction('test.ua.1');
15 15
16 // Log a metric more than once. 16 // Log a metric more than once.
17 chrome.metricsPrivate.recordUserAction('test.ua.2'); 17 chrome.metricsPrivate.recordUserAction('test.ua.2');
18 chrome.metricsPrivate.recordUserAction('test.ua.2'); 18 chrome.metricsPrivate.recordUserAction('test.ua.2');
19 19
20 chrome.test.succeed(); 20 chrome.test.succeed();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } 60 }
61 ]); 61 ]);
62 62
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698