Skip to content

Commit

Permalink
chore: update WPT (#3615)
Browse files Browse the repository at this point in the history
Co-authored-by: Uzlopak <5059100+Uzlopak@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and Uzlopak committed Sep 17, 2024
1 parent 9dd11b1 commit 0ad6007
Showing 1 changed file with 88 additions and 0 deletions.
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");
}
};
})();

0 comments on commit 0ad6007

Please sign in to comment.