mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 8010e0cbd228 (bug 1177871) for Windows debug test_geolocation_provider_timeout.js crashes.
CLOSED TREE
This commit is contained in:
parent
74c5c39d89
commit
b5295be137
@ -505,12 +505,6 @@ WifiGeoPositionProvider.prototype = {
|
||||
xhr.responseType = "json";
|
||||
xhr.mozBackgroundRequest = true;
|
||||
xhr.channel.loadFlags = Ci.nsIChannel.LOAD_ANONYMOUS;
|
||||
xhr.timeout = Services.prefs.getIntPref("geo.wifi.xhr.timeout");
|
||||
xhr.ontimeout = (function() {
|
||||
LOG("Location request XHR timed out.")
|
||||
this.notifyListener("notifyError",
|
||||
[POSITION_UNAVAILABLE]);
|
||||
}).bind(this);
|
||||
xhr.onerror = (function() {
|
||||
this.notifyListener("notifyError",
|
||||
[POSITION_UNAVAILABLE]);
|
||||
|
@ -1,48 +0,0 @@
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://testing-common/httpd.js");
|
||||
|
||||
var httpserver = null;
|
||||
var geolocation = null;
|
||||
|
||||
function geoHandler(metadata, response)
|
||||
{
|
||||
response.processAsync();
|
||||
}
|
||||
|
||||
function successCallback() {
|
||||
// The call shouldn't be sucessful.
|
||||
do_check_true(false);
|
||||
do_test_finished();
|
||||
}
|
||||
|
||||
function errorCallback() {
|
||||
do_check_true(true);
|
||||
do_test_finished();
|
||||
}
|
||||
|
||||
function run_test()
|
||||
{
|
||||
do_test_pending();
|
||||
|
||||
// XPCShell does not get a profile by default. The geolocation service
|
||||
// depends on the settings service which uses IndexedDB and IndexedDB
|
||||
// needs a place where it can store databases.
|
||||
do_get_profile();
|
||||
|
||||
httpserver = new HttpServer();
|
||||
httpserver.registerPathHandler("/geo", geoHandler);
|
||||
httpserver.start(-1);
|
||||
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
||||
prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
|
||||
httpserver.identity.primaryPort + "/geo");
|
||||
prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
|
||||
|
||||
// Setting timeout to a very low value to ensure time out will happen.
|
||||
prefs.setIntPref("geo.wifi.xhr.timeout", 5);
|
||||
|
||||
geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
|
||||
geolocation.getCurrentPosition(successCallback, errorCallback);
|
||||
}
|
@ -24,5 +24,3 @@ skip-if = os == "android"
|
||||
skip-if = os == "mac" || os == "android"
|
||||
[test_PromiseDebugging.js]
|
||||
[test_xhr_init.js]
|
||||
[test_geolocation_provider_timeout.js]
|
||||
skip-if = os == "android"
|
||||
|
@ -4335,9 +4335,6 @@ pref("layers.compositor-lru-size", 0);
|
||||
// Enable/Disable the geolocation API for content
|
||||
pref("geo.enabled", true);
|
||||
|
||||
// Timeout for outbound network geolocation provider XHR
|
||||
pref("geo.wifi.xhr.timeout", 60000);
|
||||
|
||||
// Enable/Disable the orientation API for content
|
||||
pref("device.sensors.enabled", true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user