Skip to content

Commit 0ad6007

Browse files
chore: update WPT (#3615)
Co-authored-by: Uzlopak <[email protected]>
1 parent 9dd11b1 commit 0ad6007

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

test/fixtures/wpt/resources/testdriver.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,82 @@
11411141
*/
11421142
run_bounce_tracking_mitigations: function (context = null) {
11431143
return window.test_driver_internal.run_bounce_tracking_mitigations(context);
1144+
},
1145+
1146+
/**
1147+
* Creates a virtual pressure source.
1148+
*
1149+
* Matches the `Create virtual pressure source
1150+
* <https://w3c.github.io/compute-pressure/#create-virtual-pressure-source>`_
1151+
* WebDriver command.
1152+
*
1153+
* @param {String} source_type - A `virtual pressure source type
1154+
* <https://w3c.github.io/compute-pressure/#dom-pressuresource>`_
1155+
* such as "cpu".
1156+
* @param {Object} [metadata={}] - Optional parameters described
1157+
* in `Create virtual pressure source
1158+
* <https://w3c.github.io/compute-pressure/#create-virtual-pressure-source>`_.
1159+
* @param {WindowProxy} [context=null] - Browsing context in which to
1160+
* run the call, or null for the
1161+
* current browsing context.
1162+
*
1163+
* @returns {Promise} Fulfilled when virtual pressure source is created.
1164+
* Rejected in case the WebDriver command errors out
1165+
* (including if a virtual pressure source of the
1166+
* same type already exists).
1167+
*/
1168+
create_virtual_pressure_source: function(source_type, metadata={}, context=null) {
1169+
return window.test_driver_internal.create_virtual_pressure_source(source_type, metadata, context);
1170+
},
1171+
1172+
/**
1173+
* Causes a virtual pressure source to report a new reading.
1174+
*
1175+
* Matches the `Update virtual pressure source
1176+
* <https://w3c.github.io/compute-pressure/#update-virtual-pressure-source>`_
1177+
* WebDriver command.
1178+
*
1179+
* @param {String} source_type - A `virtual pressure source type
1180+
* <https://w3c.github.io/compute-pressure/#dom-pressuresource>`_
1181+
* such as "cpu".
1182+
* @param {String} sample - A `virtual pressure state
1183+
* <https://w3c.github.io/compute-pressure/#dom-pressurestate>`_
1184+
* such as "critical".
1185+
* @param {WindowProxy} [context=null] - Browsing context in which to
1186+
* run the call, or null for the
1187+
* current browsing context.
1188+
*
1189+
* @returns {Promise} Fulfilled after the reading update reaches the
1190+
* virtual pressure source. Rejected in case the
1191+
* WebDriver command errors out (including if a
1192+
* virtual pressure source of the given type does not
1193+
* exist).
1194+
*/
1195+
update_virtual_pressure_source: function(source_type, sample, context=null) {
1196+
return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, context);
1197+
},
1198+
1199+
/**
1200+
* Removes created virtual pressure source.
1201+
*
1202+
* Matches the `Delete virtual pressure source
1203+
* <https://w3c.github.io/compute-pressure/#delete-virtual-pressure-source>`_
1204+
* WebDriver command.
1205+
*
1206+
* @param {String} source_type - A `virtual pressure source type
1207+
* <https://w3c.github.io/compute-pressure/#dom-pressuresource>`_
1208+
* such as "cpu".
1209+
* @param {WindowProxy} [context=null] - Browsing context in which to
1210+
* run the call, or null for the
1211+
* current browsing context.
1212+
*
1213+
* @returns {Promise} Fulfilled after the virtual pressure source has
1214+
* been removed or if a pressure source of the given
1215+
* type does not exist. Rejected in case the
1216+
* WebDriver command errors out.
1217+
*/
1218+
remove_virtual_pressure_source: function(source_type, context=null) {
1219+
return window.test_driver_internal.remove_virtual_pressure_source(source_type, context);
11441220
}
11451221
};
11461222

@@ -1356,6 +1432,18 @@
13561432

13571433
async run_bounce_tracking_mitigations(context=null) {
13581434
throw new Error("run_bounce_tracking_mitigations() is not implemented by testdriver-vendor.js");
1435+
},
1436+
1437+
async create_virtual_pressure_source(source_type, metadata={}, context=null) {
1438+
throw new Error("create_virtual_pressure_source() is not implemented by testdriver-vendor.js");
1439+
},
1440+
1441+
async update_virtual_pressure_source(source_type, sample, context=null) {
1442+
throw new Error("update_virtual_pressure_source() is not implemented by testdriver-vendor.js");
1443+
},
1444+
1445+
async remove_virtual_pressure_source(source_type, context=null) {
1446+
throw new Error("remove_virtual_pressure_source() is not implemented by testdriver-vendor.js");
13591447
}
13601448
};
13611449
})();

0 commit comments

Comments
 (0)