Skip to content

Commit

Permalink
compute pressure: Rename supportedSources to knownSources
Browse files Browse the repository at this point in the history
Based on specification change [1], supportedSources attribute
is renamed to knownSources.

[1]: w3c/compute-pressure#268

Bug: 337837870
Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092
Commit-Queue: Arnaud Mandy <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Reviewed-by: Mike Taylor <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1294408}
  • Loading branch information
arskama authored and chromium-wpt-export-bot committed Apr 30, 2024
1 parent 9753aaa commit 02b375d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

test(() => {
// Compute Pressure should support at least "cpu"
const sources = PressureObserver.supportedSources;
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.supportedSources;
assert_equals(sources, PressureObserver.supportedSources);
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.supportedSources;
assert_equals(Object.isFrozen(), true);
let sources = PressureObserver.knownSources;
assert_equals(Object.isFrozen(sources), true);
}, 'PressureObserver must return a frozen array');
2 changes: 1 addition & 1 deletion interfaces/compute-pressure.idl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface PressureObserver {
undefined disconnect();
sequence<PressureRecord> takeRecords();

[SameObject] static readonly attribute FrozenArray<PressureSource> supportedSources;
[SameObject] static readonly attribute FrozenArray<PressureSource> knownSources;
};

[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
Expand Down

0 comments on commit 02b375d

Please sign in to comment.