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

Update WPT #3615

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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
88 changes: 88 additions & 0 deletions test/fixtures/wpt/resources/testdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,82 @@
*/
run_bounce_tracking_mitigations: function (context = null) {
return window.test_driver_internal.run_bounce_tracking_mitigations(context);
},

/**
* Creates a virtual pressure source.
*
* Matches the `Create virtual pressure source
* <https://w3c.github.io/compute-pressure/#create-virtual-pressure-source>`_
* WebDriver command.
*
* @param {String} source_type - A `virtual pressure source type
* <https://w3c.github.io/compute-pressure/#dom-pressuresource>`_
* such as "cpu".
* @param {Object} [metadata={}] - Optional parameters described
* in `Create virtual pressure source
* <https://w3c.github.io/compute-pressure/#create-virtual-pressure-source>`_.
* @param {WindowProxy} [context=null] - Browsing context in which to
* run the call, or null for the
* current browsing context.
*
* @returns {Promise} Fulfilled when virtual pressure source is created.
* Rejected in case the WebDriver command errors out
* (including if a virtual pressure source of the
* same type already exists).
*/
create_virtual_pressure_source: function(source_type, metadata={}, context=null) {
return window.test_driver_internal.create_virtual_pressure_source(source_type, metadata, context);
},

/**
* Causes a virtual pressure source to report a new reading.
*
* Matches the `Update virtual pressure source
* <https://w3c.github.io/compute-pressure/#update-virtual-pressure-source>`_
* WebDriver command.
*
* @param {String} source_type - A `virtual pressure source type
* <https://w3c.github.io/compute-pressure/#dom-pressuresource>`_
* such as "cpu".
* @param {String} sample - A `virtual pressure state
* <https://w3c.github.io/compute-pressure/#dom-pressurestate>`_
* such as "critical".
* @param {WindowProxy} [context=null] - Browsing context in which to
* run the call, or null for the
* current browsing context.
*
* @returns {Promise} Fulfilled after the reading update reaches the
* virtual pressure source. Rejected in case the
* WebDriver command errors out (including if a
* virtual pressure source of the given type does not
* exist).
*/
update_virtual_pressure_source: function(source_type, sample, context=null) {
return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, context);
},

/**
* Removes created virtual pressure source.
*
* Matches the `Delete virtual pressure source
* <https://w3c.github.io/compute-pressure/#delete-virtual-pressure-source>`_
* WebDriver command.
*
* @param {String} source_type - A `virtual pressure source type
* <https://w3c.github.io/compute-pressure/#dom-pressuresource>`_
* such as "cpu".
* @param {WindowProxy} [context=null] - Browsing context in which to
* run the call, or null for the
* current browsing context.
*
* @returns {Promise} Fulfilled after the virtual pressure source has
* been removed or if a pressure source of the given
* type does not exist. Rejected in case the
* WebDriver command errors out.
*/
remove_virtual_pressure_source: function(source_type, context=null) {
return window.test_driver_internal.remove_virtual_pressure_source(source_type, context);
}
};

Expand Down Expand Up @@ -1356,6 +1432,18 @@

async run_bounce_tracking_mitigations(context=null) {
throw new Error("run_bounce_tracking_mitigations() is not implemented by testdriver-vendor.js");
},

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

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

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