|
1141 | 1141 | */
|
1142 | 1142 | run_bounce_tracking_mitigations: function (context = null) {
|
1143 | 1143 | 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); |
1144 | 1220 | }
|
1145 | 1221 | };
|
1146 | 1222 |
|
|
1356 | 1432 |
|
1357 | 1433 | async run_bounce_tracking_mitigations(context=null) {
|
1358 | 1434 | 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"); |
1359 | 1447 | }
|
1360 | 1448 | };
|
1361 | 1449 | })();
|
0 commit comments