New issue
Advanced search Search tips

Issue 639344 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

The location override remembers the last overridden location even if "No override" is selected

Reported by m...@azimi.me, Aug 19 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. Go to goog.com
2. execute this in console navigator.geolocation.getCurrentPosition(console.log.bind(console)) 
3. not the location
4. use geolocation override to override it to Berlin
5. Run navigator.geolocation.getCurrentPosition(console.log.bind(console)) again and see the location is changed
6. change geolocation override to 'no override'
7. refresh
8. see the geolocation override is set on `no override`
9. run navigator.geolocation.getCurrentPosition(console.log.bind(console)) again and note the geolocation value

What is the expected behavior?
it should return current location coords

What went wrong?
it shows Berlin coords even after setting the geolocation override to no override 

Did this work before? No 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0

changing geolocation to something else and back to override can bypass this issue
 
Screen Shot 2016-08-19 at 10.39.09 AM.png
119 KB View Download

Comment 1 by m...@azimi.me, Aug 19 2016

Typo: 1. go to google.com

Comment 2 by l...@chromium.org, Aug 20 2016

Labels: -Pri-2 Pri-1
Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 3 by l...@chromium.org, Oct 28 2016

Labels: -Pri-1 Pri-2
Labels: Hotlist-Polish
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7eebce267e14f4dafa8eb0609ad7c89ad713345e

commit 7eebce267e14f4dafa8eb0609ad7c89ad713345e
Author: Erik Luo <luoe@chromium.org>
Date: Fri Dec 15 22:11:18 2017

DevTools: fix clearing of geolocation override

The EmulationAgent can clear the existing geolocation override.
In the original implementation, it resets the geoposition_override_
https://codereview.chromium.org/603323004

During a later refactoring, it looks like this line was dropped
which led to newly created impls that reused the old override even
after it should have been cleared.
https://codereview.chromium.org/628773003

Bug:  639344 
Change-Id: I0a76aa60b70265fc604fc87d68566ff815878433
Reviewed-on: https://chromium-review.googlesource.com/823276
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524482}
[modify] https://crrev.com/7eebce267e14f4dafa8eb0609ad7c89ad713345e/device/geolocation/geolocation_context.cc
[modify] https://crrev.com/7eebce267e14f4dafa8eb0609ad7c89ad713345e/third_party/WebKit/LayoutTests/http/tests/devtools/geolocation-emulation-tests-expected.txt
[modify] https://crrev.com/7eebce267e14f4dafa8eb0609ad7c89ad713345e/third_party/WebKit/LayoutTests/http/tests/devtools/geolocation-emulation-tests.js

Comment 6 by l...@chromium.org, Dec 15 2017

Status: Fixed (was: Assigned)

Sign in to add a comment