Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute pressure: Rename estimate to own_contribution_estimate #51679

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions resources/testdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@
* @param {String} sample - A `virtual pressure state
* <https://w3c.github.io/compute-pressure/#dom-pressurestate>`_
* such as "critical".
* @param {number} estimate - Optional, A `virtual own contribution estimate`
* @param {number} own_contribution_estimate - Optional, A `virtual own contribution estimate`
* <https://w3c.github.io/compute-pressure/?experimental=1#the-owncontributionestimate-attribute>`_
* @param {WindowProxy} [context=null] - Browsing context in which to
* run the call, or null for the
Expand All @@ -1449,8 +1449,8 @@
* virtual pressure source of the given type does not
* exist).
*/
update_virtual_pressure_source: function(source_type, sample, estimate, context=null) {
return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, estimate, context);
update_virtual_pressure_source: function(source_type, sample, own_contribution_estimate, context=null) {
return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, own_contribution_estimate, context);
},

/**
Expand Down Expand Up @@ -1748,7 +1748,7 @@
throw new Error("create_virtual_pressure_source() is not implemented by testdriver-vendor.js");
},

async update_virtual_pressure_source(source_type, sample, estimate, context=null) {
async update_virtual_pressure_source(source_type, sample, own_contribution_estimate, context=null) {
throw new Error("update_virtual_pressure_source() is not implemented by testdriver-vendor.js");
},

Expand Down
4 changes: 2 additions & 2 deletions tools/wptrunner/wptrunner/executors/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ def __init__(self, logger, protocol):
def __call__(self, payload):
source_type = payload["source_type"]
sample = payload["sample"]
estimate = payload["estimate"]
return self.protocol.pressure.update_virtual_pressure_source(source_type, sample, estimate)
own_contribution_estimate = payload["own_contribution_estimate"]
return self.protocol.pressure.update_virtual_pressure_source(source_type, sample, own_contribution_estimate)

class RemoveVirtualPressureSourceAction:
name = "remove_virtual_pressure_source"
Expand Down
2 changes: 1 addition & 1 deletion tools/wptrunner/wptrunner/executors/executormarionette.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def setup(self):
def create_virtual_pressure_source(self, source_type, metadata):
raise NotImplementedError("create_virtual_pressure_source not yet implemented")

def update_virtual_pressure_source(self, source_type, sample, estimate):
def update_virtual_pressure_source(self, source_type, sample, own_contribution_estimate):
raise NotImplementedError("update_virtual_pressure_source not yet implemented")

def remove_virtual_pressure_source(self, source_type):
Expand Down
4 changes: 2 additions & 2 deletions tools/wptrunner/wptrunner/executors/executorwebdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,8 @@ def create_virtual_pressure_source(self, source_type, metadata):
body.update(metadata)
return self.webdriver.send_session_command("POST", "pressuresource", body)

def update_virtual_pressure_source(self, source_type, sample, estimate):
body = {"sample": sample, "estimate": estimate}
def update_virtual_pressure_source(self, source_type, sample, own_contribution_estimate):
body = {"sample": sample, "own_contribution_estimate": own_contribution_estimate}
return self.webdriver.send_session_command("POST", "pressuresource/%s" % source_type, body)

def remove_virtual_pressure_source(self, source_type):
Expand Down
2 changes: 1 addition & 1 deletion tools/wptrunner/wptrunner/executors/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ def create_virtual_pressure_source(self, source_type, metadata):
pass

@abstractmethod
def update_virtual_pressure_source(self, source_type, sample, estimate):
def update_virtual_pressure_source(self, source_type, sample, own_contribution_estimate):
pass

@abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions tools/wptrunner/wptrunner/testdriver-extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@
return create_context_action("create_virtual_pressure_source", context, {source_type, metadata});
};

window.test_driver_internal.update_virtual_pressure_source = function(source_type, sample, estimate, context=null) {
return create_context_action("update_virtual_pressure_source", context, {source_type, sample, estimate});
window.test_driver_internal.update_virtual_pressure_source = function(source_type, sample, own_contribution_estimate, context=null) {
return create_context_action("update_virtual_pressure_source", context, {source_type, sample, own_contribution_estimate});
};

window.test_driver_internal.remove_virtual_pressure_source = function(source_type, context=null) {
Expand Down
Loading