Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / test / data / system / cpu / test_cpu_api.js
blob746b46e9c486fa918b7ea65a262ebcc9200222e2
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
3 // found in the LICENSE file.
5 // system.cpu.getInfo api test
6 // extensions_browsertests --gtest_filter=SystemCpuApiTest.*
8 chrome.test.runTests([
9   function testGet() {
10     var expectedProcessors = [{
11       usage: {
12         kernel: 1,
13         user: 2,
14         idle: 3,
15         total: 6
16       }
17     }];
18     for(var i = 0; i < 20; ++i) {
19       chrome.system.cpu.getInfo(chrome.test.callbackPass(function(result) {
20         chrome.test.assertEq(4, result.numOfProcessors);
21         chrome.test.assertEq("x86", result.archName);
22         chrome.test.assertEq("unknown", result.modelName);
23         chrome.test.assertEq(["mmx", "avx"], result.features);
24         chrome.test.assertEq(expectedProcessors, result.processors);
25       }));
26     }
27   }
28 ]);