Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005'

This commit is contained in:
WPT Sync Bot 2022-11-10 01:22:36 +00:00
parent ace9b32b1c
commit df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions

View file

@ -1,17 +1,28 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// https://www.w3.org/TR/geolocation-API/
idl_test(
['geolocation'],
['hr-time', 'html'],
idl_array => {
self.audio = document.createElement('audio');
self.video = document.createElement('video');
window.onload = async () => {
await test_driver.set_permission({ name: "geolocation" }, "denied");
const positionError = await new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition(reject, resolve);
});
await test_driver.set_permission({ name: "geolocation" }, "granted");
const position = await new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition(resolve, reject);
});
idl_test(["geolocation"], ["hr-time", "html"], (idl_array) => {
idl_array.add_objects({
Navigator: ['navigator'],
Geolocation: ['navigator.geolocation'],
Navigator: ["navigator"],
Geolocation: ["navigator.geolocation"],
GeolocationPositionError: [positionError],
GeolocationPosition: [position],
GeolocationCoordinates: [position.coords],
});
}
);
});
};