summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js')
-rw-r--r--testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js b/testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js
new file mode 100644
index 0000000000..5db3053ce9
--- /dev/null
+++ b/testing/web-platform/tests/compute-pressure/compute_pressure_known_sources.https.any.js
@@ -0,0 +1,21 @@
+// 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');