Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 3 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /compute-pressure/compute_pressure_known_sources.https.any.html - WPT Dashboard Interop Dashboard
- /compute-pressure/compute_pressure_known_sources.https.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /compute-pressure/compute_pressure_known_sources.https.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,dedicatedworker,sharedworker
'use strict';
test(() => {
// Compute Pressure should support at least "cpu"
const sources = PressureObserver.knownSources;
assert_in_array('cpu', sources);
}, 'PressureObserver should support at least "cpu"');
test(() => {
// Compute Pressure should be frozen array
const sources = PressureObserver.knownSources;
assert_equals(sources, PressureObserver.knownSources);
}, 'PressureObserver must return always the same array');
test(() => {
// Compute Pressure should be frozen array
let sources = PressureObserver.knownSources;
assert_equals(Object.isFrozen(sources), true);
}, 'PressureObserver must return a frozen array');