Skip to content

Commit

Permalink
[geolocation] Rename interfaces and remove [NoInterfaceObject]
Browse files Browse the repository at this point in the history
This change renames the following interfaces and removes the
[NoInterfaceObject] annotation so that these types are now exposed to
script:

  Coordinates   -> GeolocationCoordinates
  Position      -> GeolocationPosition
  PositionError -> GeolocationPositionError

This is done in response to an effort to remove this annotation from
WebIDL.

Spec pull requests (merged):
w3c/geolocation#20
w3c/geolocation#23

Intent to Ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/Xig9oewsQMA/eyC7dbtiAAAJ

Bug: 931847
Change-Id: I38d0172afc33d5757b664e2807356d8727e82d7f
  • Loading branch information
reillyeon authored and chromium-wpt-export-bot committed Sep 11, 2019
1 parent f69dc54 commit 8731e26
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions geolocation-API/getCurrentPosition_IDL.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,29 @@
var ii, oldval;

/*
[NoInterfaceObject]
interface Position {
readonly attribute Coordinates coords;
interface GeolocationPosition {
readonly attribute GeolocationCoordinates coords;
readonly attribute DOMTimeStamp timestamp;
};
*/

test(function() {
assert_equals(position.toString(), "[object Position]",
"Position.toString should result in '[object Position]' was: " + position.toString());
}, "Position toString");
assert_equals(position.toString(), "[object GeolocationPosition]",
"position.toString should result in '[object GeolocationPosition]' was: " + position.toString());
}, "GeolocationPosition toString");

test(function() {
assert_equals(position.coords.toString(), "[object Coordinates]",
"position.coords.toString should result in '[object Coordinates]' was: " + position.coords.toString());
}, "Position.coordinates toString");
assert_equals(position.coords.toString(), "[object GeolocationCoordinates]",
"position.coords.toString should result in '[object GeolocationCoordinates]' was: " + position.coords.toString());
}, "GeolocationCoordinates toString");

test(function() {
assert_equals(typeof(position.timestamp), "number",
"Position.timestamp should be of type 'number' was: " + typeof(position.timestamp));
}, "Position.timestamp is type number");
"position.timestamp should be of type 'number' was: " + typeof(position.timestamp));
}, "GeolocationPosition.timestamp is type number");

/*
[NoInterfaceObject]
interface Coordinates {
interface GeolocationCoordinates {
readonly attribute double latitude;
readonly attribute double longitude;
readonly attribute double? altitude;
Expand Down Expand Up @@ -103,10 +101,10 @@
function errorCallback(error)
{
test(function() {
assert_equals(error.toString(), "[object PositionError]",
"PositionError.toString should result in '[object PositionError]' was: " +
assert_equals(error.toString(), "[object GeolocationPositionError]",
"error.toString should result in '[object GeolocationPositionError]' was: " +
error.toString());
}, "PositionError toString");
}, "GeolocationPositionError toString");

test(function() {
assert_equals(error.PERMISSION_DENIED, 1,
Expand Down

0 comments on commit 8731e26

Please sign in to comment.