Changeset 270048 in webkit


Ignore:
Timestamp:
Nov 19, 2020 1:06:46 PM (3 years ago)
Author:
Chris Dumez
Message:

Regression(r267865) Geolocation API's error callback should be nullable
https://bugs.webkit.org/show_bug.cgi?id=219165

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

  • web-platform-tests/geolocation-API/PositionOptions.https-expected.txt:

Source/WebCore:

Geolocation API's error callback should be nullable. The callback is nullable in both Firefox
and Chrome and there is at least one WPT test that fails unless the error callback is nullable.

The specification does not have this parameter as nullable. However, it is particularly risky
to be the only engine matching the specification here, especially considering that we used to
match other browser engines.

No new tests, updated / rebaselined existing tests.

  • Modules/geolocation/Geolocation.idl:

LayoutTests:

Update existing test to reflect behavior change.

  • fast/dom/Geolocation/argument-types-expected.txt:
  • fast/dom/Geolocation/argument-types.html:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r270044 r270048  
     12020-11-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r267865) Geolocation API's error callback should be nullable
     4        https://bugs.webkit.org/show_bug.cgi?id=219165
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Update existing test to reflect behavior change.
     9
     10        * fast/dom/Geolocation/argument-types-expected.txt:
     11        * fast/dom/Geolocation/argument-types.html:
     12
    1132020-11-19  Zalan Bujtas  <zalan@apple.com>
    214
  • trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt

    r267865 r270048  
    1818PASS navigator.geolocation.getCurrentPosition("string") threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
    1919PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception.
    20 PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
     20PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw exception.
    2121PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
    2222PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
     
    7979PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:-Infinity}) did not throw exception.
    8080PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:"string"}) did not throw exception.
     81PASS navigator.geolocation.watchPosition(emptyFunction, null) did not throw exception.
    8182PASS successfullyParsed is true
    8283
  • trunk/LayoutTests/fast/dom/Geolocation/argument-types.html

    r267865 r270048  
    5757
    5858test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined)', false);
    59 test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
     59test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', false);
    6060test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
    6161test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
     
    124124test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:"string"})', false);
    125125
     126test("navigator.geolocation.watchPosition(emptyFunction, null)", false);
     127
    126128window.jsTestIsAsync = false;
    127129
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r270047 r270048  
     12020-11-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r267865) Geolocation API's error callback should be nullable
     4        https://bugs.webkit.org/show_bug.cgi?id=219165
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Rebaseline WPT test now that more checks are passing.
     9
     10        * web-platform-tests/geolocation-API/PositionOptions.https-expected.txt:
     11
    1122020-11-19  Darin Adler  <darin@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/geolocation-API/PositionOptions.https-expected.txt

    r270014 r270048  
    11
    2 FAIL Call getCurrentPosition with wrong type for enableHighAccuracy. No exception expected. assert_unreached: An exception was thrown unexpectedly: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function Reached unreachable code
    3 FAIL Call watchPosition with wrong type for enableHighAccuracy. No exception expected. assert_unreached: An exception was thrown unexpectedly: Argument 2 ('errorCallback') to Geolocation.watchPosition must be a function Reached unreachable code
     2PASS Call getCurrentPosition with wrong type for enableHighAccuracy. No exception expected.
     3PASS Call watchPosition with wrong type for enableHighAccuracy. No exception expected.
    44FAIL PositionOptions tests promise_test: Unhandled rejection with value: object "Error: unimplemented"
    55
  • trunk/Source/WebCore/ChangeLog

    r270046 r270048  
     12020-11-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r267865) Geolocation API's error callback should be nullable
     4        https://bugs.webkit.org/show_bug.cgi?id=219165
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Geolocation API's error callback should be nullable. The callback is nullable in both Firefox
     9        and Chrome and there is at least one WPT test that fails unless the error callback is nullable.
     10
     11        The specification does not have this parameter as nullable. However, it is particularly risky
     12        to be the only engine matching the specification here, especially considering that we used to
     13        match other browser engines.
     14
     15        No new tests, updated / rebaselined existing tests.
     16
     17        * Modules/geolocation/Geolocation.idl:
     18
    1192020-11-19  Chris Dumez  <cdumez@apple.com>
    220
  • trunk/Source/WebCore/Modules/geolocation/Geolocation.idl

    r267865 r270048  
    3232] interface Geolocation {
    3333    undefined getCurrentPosition(PositionCallback successCallback,
    34                             optional PositionErrorCallback errorCallback,
     34                            optional PositionErrorCallback? errorCallback,
    3535                            optional PositionOptions options);
    3636
    3737    long watchPosition(PositionCallback successCallback,
    38                        optional PositionErrorCallback errorCallback,
     38                       optional PositionErrorCallback? errorCallback,
    3939                       optional PositionOptions options);
    4040
Note: See TracChangeset for help on using the changeset viewer.