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

Unified Diff: chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpu_api.js

Issue 15817008: Move systemInfo.cpu API out out experimental namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/templates/public/extensions/experimental_systemInfo_storage.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpu_api.js
diff --git a/chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpu_api.js b/chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpu_api.js
index 61c1106e3d7ca4dc992f40f8cae5425e265c74b8..9a4874b1cede29ce06fa51bd4ee71f05f4e197c7 100644
--- a/chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpu_api.js
+++ b/chrome/test/data/extensions/api_test/systeminfo/cpu/test_cpu_api.js
@@ -5,13 +5,6 @@
// systeminfo.cpu api test
// browser_tests.exe --gtest_filter=SystemInfoCpuApiTest.*
-var userStep = 3;
-var kernelStep = 2;
-var idleStep = 1;
-function calculateUsage(count) {
- return (100 - idleStep * 100/(userStep + kernelStep + idleStep));
-}
-
chrome.test.runTests([
function testGet() {
for(var i = 0; i < 20; ++i) {
@@ -21,22 +14,6 @@ chrome.test.runTests([
chrome.test.assertEq("unknown", result.modelName);
}));
}
- },
-
- function testUpdatedEvent() {
- var numOfUpdatedEvent = 0;
- var doneUpdatedEvent = chrome.test.listenForever(
- chrome.systemInfo.cpu.onUpdated,
- function listener(updateInfo) {
- var expectedUsage = calculateUsage(numOfUpdatedEvent);
- chrome.test.assertEq(updateInfo.averageUsage, expectedUsage);
-
- chrome.test.assertEq(updateInfo.usagePerProcessor.length, 4);
- for (var i = 0; i < updateInfo.usagePerProcessor.length; ++i)
- chrome.test.assertEq(updateInfo.usagePerProcessor[i], expectedUsage);
- if (++numOfUpdatedEvent > 5)
- doneUpdatedEvent();
- });
}
]);
« no previous file with comments | « chrome/common/extensions/docs/templates/public/extensions/experimental_systemInfo_storage.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698