mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Import geolocation/idlharness.https.window.html WPT test
This commit is contained in:
parent
63fd4cf9e4
commit
f3c1dfb2f1
Notes:
github-actions[bot]
2025-06-21 08:01:36 +00:00
Author: https://github.com/gmta
Commit: f3c1dfb2f1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5143
5 changed files with 185 additions and 0 deletions
|
@ -0,0 +1,74 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 68 tests
|
||||
|
||||
13 Pass
|
||||
55 Fail
|
||||
Pass idl_test setup
|
||||
Pass idl_test validation
|
||||
Pass Partial interface Navigator: original interface defined
|
||||
Pass Partial interface Navigator: member names are unique
|
||||
Pass Partial interface Navigator[2]: member names are unique
|
||||
Pass Partial interface mixin NavigatorID: member names are unique
|
||||
Pass Navigator includes NavigatorID: member names are unique
|
||||
Pass Navigator includes NavigatorLanguage: member names are unique
|
||||
Pass Navigator includes NavigatorOnLine: member names are unique
|
||||
Pass Navigator includes NavigatorContentUtils: member names are unique
|
||||
Pass Navigator includes NavigatorCookies: member names are unique
|
||||
Pass Navigator includes NavigatorPlugins: member names are unique
|
||||
Pass Navigator includes NavigatorConcurrentHardware: member names are unique
|
||||
Fail Geolocation interface: existence and properties of interface object
|
||||
Fail Geolocation interface object length
|
||||
Fail Geolocation interface object name
|
||||
Fail Geolocation interface: existence and properties of interface prototype object
|
||||
Fail Geolocation interface: existence and properties of interface prototype object's "constructor" property
|
||||
Fail Geolocation interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Fail Geolocation interface: operation getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)
|
||||
Fail Geolocation interface: operation watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)
|
||||
Fail Geolocation interface: operation clearWatch(long)
|
||||
Fail Geolocation must be primary interface of navigator.geolocation
|
||||
Fail Stringification of navigator.geolocation
|
||||
Fail Geolocation interface: navigator.geolocation must inherit property "getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)" with the proper type
|
||||
Fail Geolocation interface: calling getCurrentPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) on navigator.geolocation with too few arguments must throw TypeError
|
||||
Fail Geolocation interface: navigator.geolocation must inherit property "watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions)" with the proper type
|
||||
Fail Geolocation interface: calling watchPosition(PositionCallback, optional PositionErrorCallback?, optional PositionOptions) on navigator.geolocation with too few arguments must throw TypeError
|
||||
Fail Geolocation interface: navigator.geolocation must inherit property "clearWatch(long)" with the proper type
|
||||
Fail Geolocation interface: calling clearWatch(long) on navigator.geolocation with too few arguments must throw TypeError
|
||||
Fail GeolocationPosition interface: existence and properties of interface object
|
||||
Fail GeolocationPosition interface object length
|
||||
Fail GeolocationPosition interface object name
|
||||
Fail GeolocationPosition interface: existence and properties of interface prototype object
|
||||
Fail GeolocationPosition interface: existence and properties of interface prototype object's "constructor" property
|
||||
Fail GeolocationPosition interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Fail GeolocationPosition interface: attribute coords
|
||||
Fail GeolocationPosition interface: attribute timestamp
|
||||
Fail GeolocationPosition interface: operation toJSON()
|
||||
Fail GeolocationCoordinates interface: existence and properties of interface object
|
||||
Fail GeolocationCoordinates interface object length
|
||||
Fail GeolocationCoordinates interface object name
|
||||
Fail GeolocationCoordinates interface: existence and properties of interface prototype object
|
||||
Fail GeolocationCoordinates interface: existence and properties of interface prototype object's "constructor" property
|
||||
Fail GeolocationCoordinates interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Fail GeolocationCoordinates interface: attribute accuracy
|
||||
Fail GeolocationCoordinates interface: attribute latitude
|
||||
Fail GeolocationCoordinates interface: attribute longitude
|
||||
Fail GeolocationCoordinates interface: attribute altitude
|
||||
Fail GeolocationCoordinates interface: attribute altitudeAccuracy
|
||||
Fail GeolocationCoordinates interface: attribute heading
|
||||
Fail GeolocationCoordinates interface: attribute speed
|
||||
Fail GeolocationCoordinates interface: operation toJSON()
|
||||
Fail GeolocationPositionError interface: existence and properties of interface object
|
||||
Fail GeolocationPositionError interface object length
|
||||
Fail GeolocationPositionError interface object name
|
||||
Fail GeolocationPositionError interface: existence and properties of interface prototype object
|
||||
Fail GeolocationPositionError interface: existence and properties of interface prototype object's "constructor" property
|
||||
Fail GeolocationPositionError interface: existence and properties of interface prototype object's @@unscopables property
|
||||
Fail GeolocationPositionError interface: constant PERMISSION_DENIED on interface object
|
||||
Fail GeolocationPositionError interface: constant PERMISSION_DENIED on interface prototype object
|
||||
Fail GeolocationPositionError interface: constant POSITION_UNAVAILABLE on interface object
|
||||
Fail GeolocationPositionError interface: constant POSITION_UNAVAILABLE on interface prototype object
|
||||
Fail GeolocationPositionError interface: constant TIMEOUT on interface object
|
||||
Fail GeolocationPositionError interface: constant TIMEOUT on interface prototype object
|
||||
Fail GeolocationPositionError interface: attribute code
|
||||
Fail GeolocationPositionError interface: attribute message
|
||||
Fail Navigator interface: attribute geolocation
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
|
||||
<script src="../resources/testharness.js"></script>
|
||||
<script src="../resources/testharnessreport.js"></script>
|
||||
<script src="../resources/WebIDLParser.js"></script>
|
||||
<script src="../resources/idlharness.js"></script>
|
||||
<script src="../resources/testdriver.js"></script>
|
||||
<script src="../resources/testdriver-vendor.js"></script>
|
||||
<div id=log></div>
|
||||
<script src="../geolocation/idlharness.https.window.js"></script>
|
|
@ -0,0 +1,14 @@
|
|||
// 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/
|
||||
|
||||
window.onload = async () => {
|
||||
idl_test(["geolocation"], ["hr-time", "html"], (idl_array) => {
|
||||
idl_array.add_objects({
|
||||
Geolocation: ["navigator.geolocation"],
|
||||
});
|
||||
});
|
||||
};
|
|
@ -0,0 +1,67 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into webref
|
||||
// (https://github.com/w3c/webref)
|
||||
// Source: Geolocation (https://w3c.github.io/geolocation/)
|
||||
|
||||
partial interface Navigator {
|
||||
[SameObject] readonly attribute Geolocation geolocation;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Geolocation {
|
||||
undefined getCurrentPosition (
|
||||
PositionCallback successCallback,
|
||||
optional PositionErrorCallback? errorCallback = null,
|
||||
optional PositionOptions options = {}
|
||||
);
|
||||
|
||||
long watchPosition (
|
||||
PositionCallback successCallback,
|
||||
optional PositionErrorCallback? errorCallback = null,
|
||||
optional PositionOptions options = {}
|
||||
);
|
||||
|
||||
undefined clearWatch (long watchId);
|
||||
};
|
||||
|
||||
callback PositionCallback = undefined (
|
||||
GeolocationPosition position
|
||||
);
|
||||
|
||||
callback PositionErrorCallback = undefined (
|
||||
GeolocationPositionError positionError
|
||||
);
|
||||
|
||||
dictionary PositionOptions {
|
||||
boolean enableHighAccuracy = false;
|
||||
[Clamp] unsigned long timeout = 0xFFFFFFFF;
|
||||
[Clamp] unsigned long maximumAge = 0;
|
||||
};
|
||||
|
||||
[Exposed=Window, SecureContext]
|
||||
interface GeolocationPosition {
|
||||
readonly attribute GeolocationCoordinates coords;
|
||||
readonly attribute EpochTimeStamp timestamp;
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
[Exposed=Window, SecureContext]
|
||||
interface GeolocationCoordinates {
|
||||
readonly attribute double accuracy;
|
||||
readonly attribute double latitude;
|
||||
readonly attribute double longitude;
|
||||
readonly attribute double? altitude;
|
||||
readonly attribute double? altitudeAccuracy;
|
||||
readonly attribute double? heading;
|
||||
readonly attribute double? speed;
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface GeolocationPositionError {
|
||||
const unsigned short PERMISSION_DENIED = 1;
|
||||
const unsigned short POSITION_UNAVAILABLE = 2;
|
||||
const unsigned short TIMEOUT = 3;
|
||||
readonly attribute unsigned short code;
|
||||
readonly attribute DOMString message;
|
||||
};
|
19
Tests/LibWeb/Text/input/wpt-import/interfaces/hr-time.idl
Normal file
19
Tests/LibWeb/Text/input/wpt-import/interfaces/hr-time.idl
Normal file
|
@ -0,0 +1,19 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into webref
|
||||
// (https://github.com/w3c/webref)
|
||||
// Source: High Resolution Time (https://w3c.github.io/hr-time/)
|
||||
|
||||
typedef double DOMHighResTimeStamp;
|
||||
|
||||
typedef unsigned long long EpochTimeStamp;
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface Performance : EventTarget {
|
||||
DOMHighResTimeStamp now();
|
||||
readonly attribute DOMHighResTimeStamp timeOrigin;
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
partial interface mixin WindowOrWorkerGlobalScope {
|
||||
[Replaceable] readonly attribute Performance performance;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue