From cf25e4d9a950ed087bb580b5c07b5d175c17599e Mon Sep 17 00:00:00 2001 From: "rogerta@chromium.org" Date: Fri, 12 Mar 2010 21:19:34 +0000 Subject: Move metrics api to the experimental name space. BUG=0 TEST=n/a Review URL: http://codereview.chromium.org/899003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41487 0039d316-1c4b-4281-b951-d872f2087c98 --- .../data/extensions/api_test/metrics/manifest.json | 3 ++- .../test/data/extensions/api_test/metrics/test.js | 27 +++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'chrome/test/data') diff --git a/chrome/test/data/extensions/api_test/metrics/manifest.json b/chrome/test/data/extensions/api_test/metrics/manifest.json index 1c45fbd..6ef2d86 100644 --- a/chrome/test/data/extensions/api_test/metrics/manifest.json +++ b/chrome/test/data/extensions/api_test/metrics/manifest.json @@ -2,5 +2,6 @@ "name": "chrome.metrics", "version": "0.1", "description": "end-to-end browser test for chrome.metrics API", - "background_page": "test.html" + "background_page": "test.html", + "permissions": ["experimental"] } diff --git a/chrome/test/data/extensions/api_test/metrics/test.js b/chrome/test/data/extensions/api_test/metrics/test.js index 2de7ba4..a4108f8 100644 --- a/chrome/test/data/extensions/api_test/metrics/test.js +++ b/chrome/test/data/extensions/api_test/metrics/test.js @@ -11,17 +11,17 @@ chrome.test.runTests([ function recordUserAction() { // Log a metric once. - chrome.metrics.recordUserAction('test.ua.1'); + chrome.experimental.metrics.recordUserAction('test.ua.1'); // Log a metric more than once. - chrome.metrics.recordUserAction('test.ua.2'); - chrome.metrics.recordUserAction('test.ua.2'); + chrome.experimental.metrics.recordUserAction('test.ua.2'); + chrome.experimental.metrics.recordUserAction('test.ua.2'); chrome.test.succeed(); }, function recordValue() { - chrome.metrics.recordValue({ + chrome.experimental.metrics.recordValue({ 'metricName': 'test.h.1', 'type': 'histogram-log', 'min': 1, @@ -29,7 +29,7 @@ chrome.test.runTests([ 'buckets': 50 }, 42); - chrome.metrics.recordValue({ + chrome.experimental.metrics.recordValue({ 'metricName': 'test.h.2', 'type': 'histogram-linear', 'min': 1, @@ -37,24 +37,25 @@ chrome.test.runTests([ 'buckets': 50 }, 42); - chrome.metrics.recordPercentage('test.h.3', 42); - chrome.metrics.recordPercentage('test.h.3', 42); + chrome.experimental.metrics.recordPercentage('test.h.3', 42); + chrome.experimental.metrics.recordPercentage('test.h.3', 42); chrome.test.succeed(); }, function recordTimes() { - chrome.metrics.recordTime('test.time', 42); - chrome.metrics.recordMediumTime('test.medium.time', 42 * 1000); - chrome.metrics.recordLongTime('test.long.time', 42 * 1000 * 60); + chrome.experimental.metrics.recordTime('test.time', 42); + chrome.experimental.metrics.recordMediumTime('test.medium.time', 42 * 1000); + chrome.experimental.metrics.recordLongTime('test.long.time', + 42 * 1000 * 60); chrome.test.succeed(); }, function recordCounts() { - chrome.metrics.recordCount('test.count', 420000); - chrome.metrics.recordMediumCount('test.medium.count', 4200); - chrome.metrics.recordSmallCount('test.small.count', 42); + chrome.experimental.metrics.recordCount('test.count', 420000); + chrome.experimental.metrics.recordMediumCount('test.medium.count', 4200); + chrome.experimental.metrics.recordSmallCount('test.small.count', 42); chrome.test.succeed(); } -- cgit v1.1