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

Side by Side Diff: extensions/test/data/system/cpu/test_cpu_api.js

Issue 2802593005: extensions: Add CPU temperatures field to system.cpu.getInfo() function (Closed)
Patch Set: Responded to tbarzic's feedback Created 3 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 unified diff | Download patch
« no previous file with comments | « extensions/common/api/system_cpu.idl ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // system.cpu.getInfo api test 5 // system.cpu.getInfo api test
6 // extensions_browsertests --gtest_filter=SystemCpuApiTest.* 6 // extensions_browsertests --gtest_filter=SystemCpuApiTest.*
7 7
8 chrome.test.runTests([ 8 chrome.test.runTests([
9 function testGet() { 9 function testGet() {
10 var expectedProcessors = [{ 10 var expectedProcessors = [{
11 usage: { 11 usage: {
12 kernel: 1, 12 kernel: 1,
13 user: 2, 13 user: 2,
14 idle: 3, 14 idle: 3,
15 total: 6 15 total: 6
16 } 16 }
17 }]; 17 }];
18 for(var i = 0; i < 20; ++i) { 18 for(var i = 0; i < 20; ++i) {
19 chrome.system.cpu.getInfo(chrome.test.callbackPass(function(result) { 19 chrome.system.cpu.getInfo(chrome.test.callbackPass(function(result) {
20 chrome.test.assertEq(4, result.numOfProcessors); 20 chrome.test.assertEq(4, result.numOfProcessors);
21 chrome.test.assertEq("x86", result.archName); 21 chrome.test.assertEq("x86", result.archName);
22 chrome.test.assertEq("unknown", result.modelName); 22 chrome.test.assertEq("unknown", result.modelName);
23 chrome.test.assertEq(["mmx", "avx"], result.features); 23 chrome.test.assertEq(["mmx", "avx"], result.features);
24 chrome.test.assertEq(expectedProcessors, result.processors); 24 chrome.test.assertEq(expectedProcessors, result.processors);
25 chrome.test.assertEq([30.125, 40.0625], result.temperatures);
25 })); 26 }));
26 } 27 }
27 } 28 }
28 ]); 29 ]);
29 30
OLDNEW
« no previous file with comments | « extensions/common/api/system_cpu.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698