mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
6f789f2007
Previously, we weren't measuring whether the machine was 64-bit properly. This change allows us to report actual CPU architecture (at least on Windows). In the future, we may wish to properly report actual CPU architecture on all operating systems. --HG-- extra : rebase_source : 73b5673e870e959a33172ec22fee8c31db6e0e53 extra : amend_source : 64d2e23be07aa87bc5c150b6e613e6226c848ec8
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
const {interfaces: Ci, results: Cr, utils: Cu} = Components;
|
|
|
|
Cu.import("resource://gre/modules/Metrics.jsm");
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
Cu.import("resource://gre/modules/services/healthreport/providers.jsm");
|
|
|
|
|
|
function run_test() {
|
|
run_next_test();
|
|
}
|
|
|
|
add_test(function test_constructor() {
|
|
let provider = new SysInfoProvider();
|
|
|
|
run_next_test();
|
|
});
|
|
|
|
add_task(function test_collect_smoketest() {
|
|
let storage = yield Metrics.Storage("collect_smoketest");
|
|
let provider = new SysInfoProvider();
|
|
yield provider.init(storage);
|
|
|
|
yield provider.collectConstantData();
|
|
|
|
let m = provider.getMeasurement("sysinfo", 2);
|
|
let data = yield storage.getMeasurementValues(m.id);
|
|
let serializer = m.serializer(m.SERIALIZE_JSON);
|
|
let d = serializer.singular(data.singular);
|
|
|
|
do_check_eq(d._v, 2);
|
|
do_check_true(d.cpuCount > 0);
|
|
do_check_neq(d.name, null);
|
|
|
|
yield storage.close();
|
|
});
|
|
|