Index: third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js b/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js |
index 208ecdc2c6eda8924cd87acd225926875505b4f2..c0ec25e9b923eb1fd27dffa4387c89ceace1ea76 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js |
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js |
@@ -74,8 +74,8 @@ WebInspector.Geolocation.parseUserInput = function(latitudeString, longitudeStri |
var latitude = isLatitudeValid ? parseFloat(latitudeString) : -1; |
var longitude = isLongitudeValid ? parseFloat(longitudeString) : -1; |
- |
- return new WebInspector.Geolocation(latitude, longitude, errorStatus ? "PositionUnavailable" : ""); |
+ var error = errorStatus ? WebInspector.Geolocation.Error.PositionUnavailable : WebInspector.Geolocation.Error.None; |
+ return new WebInspector.Geolocation(latitude, longitude, error); |
} |
/** |
@@ -95,3 +95,8 @@ WebInspector.Geolocation.longitudeValidator = function(value) |
{ |
return !value || (/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value) && value >= -180 && value <= 180); |
} |
+ |
+WebInspector.Geolocation.Error = { |
lushnikov
2016/04/23 00:19:46
/** @enum {string} */
luoe
2016/04/25 19:26:41
Done.
|
+ None: "", |
lushnikov
2016/04/23 00:19:46
None: "None",
luoe
2016/04/25 19:26:41
Okay. I've also updated another line from:
if (th
|
+ PositionUnavailable: "PositionUnavailable" |
+} |