Changeset 249207 in webkit
- Timestamp:
- Aug 28, 2019, 10:20:00 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/Geolocation/dataURL-getCurrentPosition-expected.txt (modified) (1 diff)
-
LayoutTests/fast/dom/Geolocation/dataURL-getCurrentPosition.html (modified) (1 diff)
-
LayoutTests/fast/dom/Geolocation/dataURL-watchPosition-expected.txt (modified) (1 diff)
-
LayoutTests/fast/dom/Geolocation/dataURL-watchPosition.html (modified) (1 diff)
-
LayoutTests/http/tests/security/resources/checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod.js (modified) (1 diff)
-
LayoutTests/http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition-expected.txt (modified) (2 diffs)
-
LayoutTests/http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html (modified) (1 diff)
-
LayoutTests/http/tests/security/sandboxed-iframe-geolocation-watchPosition-expected.txt (modified) (2 diffs)
-
LayoutTests/http/tests/security/sandboxed-iframe-geolocation-watchPosition.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/geolocation/Geolocation.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249205 r249207 1 2019-08-28 Chris Dumez <cdumez@apple.com> 2 3 geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure 4 https://bugs.webkit.org/show_bug.cgi?id=201221 5 6 Reviewed by Ryosuke Niwa. 7 8 Update layout tests to reflect behavior change. 9 10 * fast/dom/Geolocation/dataURL-getCurrentPosition-expected.txt: 11 * fast/dom/Geolocation/dataURL-getCurrentPosition.html: 12 * fast/dom/Geolocation/dataURL-watchPosition-expected.txt: 13 * fast/dom/Geolocation/dataURL-watchPosition.html: 14 * http/tests/security/resources/checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod.js: 15 (didReceiveError): 16 (checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod): 17 * http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition-expected.txt: 18 * http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html: 19 * http/tests/security/sandboxed-iframe-geolocation-watchPosition-expected.txt: 20 * http/tests/security/sandboxed-iframe-geolocation-watchPosition.html: 21 1 22 2019-08-28 Alicia Boya García <aboya@igalia.com> 2 23 -
trunk/LayoutTests/fast/dom/Geolocation/dataURL-getCurrentPosition-expected.txt
r195075 r249207 1 PASS error.code is error.P OSITION_UNAVAILABLE.1 PASS error.code is error.PERMISSION_DENIED. 2 2 PASS error.message is "Origin does not have permission to use Geolocation service". 3 3 -
trunk/LayoutTests/fast/dom/Geolocation/dataURL-getCurrentPosition.html
r195075 r249207 2 2 <html> 3 3 <head> 4 <!-- Tests that navigator.geolocation.getCurrentPosition() returns error P OSITION_UNAVAILABLEwhen called from a document with a data URL. -->4 <!-- Tests that navigator.geolocation.getCurrentPosition() returns error PERMISSION_DENIED when called from a document with a data URL. --> 5 5 <script src="../../../http/tests/security/resources/checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod.js"></script> 6 6 <script> -
trunk/LayoutTests/fast/dom/Geolocation/dataURL-watchPosition-expected.txt
r195075 r249207 1 PASS error.code is error.P OSITION_UNAVAILABLE.1 PASS error.code is error.PERMISSION_DENIED. 2 2 PASS error.message is "Origin does not have permission to use Geolocation service". 3 3 -
trunk/LayoutTests/fast/dom/Geolocation/dataURL-watchPosition.html
r195075 r249207 2 2 <html> 3 3 <head> 4 <!-- Tests that navigator.geolocation.watchPosition() returns error POSITION_ UNAVAILABLEwhen called from a document with a data URL. -->4 <!-- Tests that navigator.geolocation.watchPosition() returns error POSITION_DENIED when called from a document with a data URL. --> 5 5 <script src="../../../http/tests/security/resources/checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod.js"></script> 6 6 <script> -
trunk/LayoutTests/http/tests/security/resources/checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod.js
r195075 r249207 20 20 function didReceiveError(error) 21 21 { 22 if (error.code === error.P OSITION_UNAVAILABLE)23 logMessage("PASS error.code is error.P OSITION_UNAVAILABLE.");22 if (error.code === error.PERMISSION_DENIED) 23 logMessage("PASS error.code is error.PERMISSION_DENIED."); 24 24 else 25 logMessage("FAIL error.code should be " + error.P OSITION_UNAVAILABLE+ ". Was " + error.code + ".");25 logMessage("FAIL error.code should be " + error.PERMISSION_DENIED + ". Was " + error.code + "."); 26 26 27 27 if (error.message === expectedPositionUnavailableErrorMessage) -
trunk/LayoutTests/http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition-expected.txt
r231450 r249207 1 Tests that navigator.geolocation.getCurrentPosition() returns error P OSITION_UNAVAILABLEwhen called from a document in a sandboxed iframe.1 Tests that navigator.geolocation.getCurrentPosition() returns error PERMISSION_DENIED when called from a document in a sandboxed iframe. 2 2 3 3 … … 6 6 Frame: '<!--frame1-->' 7 7 -------- 8 PASS error.code is error.P OSITION_UNAVAILABLE.8 PASS error.code is error.PERMISSION_DENIED. 9 9 PASS error.message is "Origin does not have permission to use Geolocation service". 10 10 -
trunk/LayoutTests/http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html
r201423 r249207 11 11 </head> 12 12 <body> 13 <p>Tests that navigator.geolocation.getCurrentPosition() returns error P OSITION_UNAVAILABLEwhen called from a document in a sandboxed iframe.</p>13 <p>Tests that navigator.geolocation.getCurrentPosition() returns error PERMISSION_DENIED when called from a document in a sandboxed iframe.</p> 14 14 <iframe src="https://127.0.0.1:8443/security/resources/sandboxed-iframe-geolocation-getCurrentPosition.html" sandbox="allow-scripts" width="100%" height="300"></iframe> 15 15 </body> -
trunk/LayoutTests/http/tests/security/sandboxed-iframe-geolocation-watchPosition-expected.txt
r231450 r249207 1 Tests that navigator.geolocation.watchPosition() returns error P OSITION_UNAVAILABLEwhen called from a document in a sandboxed iframe.1 Tests that navigator.geolocation.watchPosition() returns error PERMISSION_DENIED when called from a document in a sandboxed iframe. 2 2 3 3 … … 6 6 Frame: '<!--frame1-->' 7 7 -------- 8 PASS error.code is error.P OSITION_UNAVAILABLE.8 PASS error.code is error.PERMISSION_DENIED. 9 9 PASS error.message is "Origin does not have permission to use Geolocation service". 10 10 -
trunk/LayoutTests/http/tests/security/sandboxed-iframe-geolocation-watchPosition.html
r201423 r249207 11 11 </head> 12 12 <body> 13 <p>Tests that navigator.geolocation.watchPosition() returns error P OSITION_UNAVAILABLEwhen called from a document in a sandboxed iframe.</p>13 <p>Tests that navigator.geolocation.watchPosition() returns error PERMISSION_DENIED when called from a document in a sandboxed iframe.</p> 14 14 <iframe src="https://127.0.0.1:8443/security/resources/sandboxed-iframe-geolocation-watchPosition.html" sandbox="allow-scripts" width="100%" height="300"></iframe> 15 15 </body> -
trunk/Source/WebCore/ChangeLog
r249205 r249207 1 2019-08-28 Chris Dumez <cdumez@apple.com> 2 3 geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure 4 https://bugs.webkit.org/show_bug.cgi?id=201221 5 6 Reviewed by Ryosuke Niwa. 7 8 geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure, 9 not POSITION_UNAVAILABLE. Both Gecko and Blink agree on PERMISSION_DENIED. 10 11 No new tests, updated existing tests. 12 13 * Modules/geolocation/Geolocation.cpp: 14 (WebCore::Geolocation::startRequest): 15 1 16 2019-08-28 Alicia Boya García <aboya@igalia.com> 2 17 -
trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp
r249066 r249207 373 373 { 374 374 if (shouldBlockGeolocationRequests()) { 375 notifier->setFatalError(GeolocationPositionError::create(GeolocationPositionError::P OSITION_UNAVAILABLE, originCannotRequestGeolocationErrorMessage));375 notifier->setFatalError(GeolocationPositionError::create(GeolocationPositionError::PERMISSION_DENIED, originCannotRequestGeolocationErrorMessage)); 376 376 return; 377 377 }
Note:
See TracChangeset
for help on using the changeset viewer.