dom/tests/unit/test_geolocation_timeout_wrap.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/unit/test_geolocation_timeout_wrap.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +const Cc = Components.classes;
     1.5 +const Ci = Components.interfaces;
     1.6 +const Cu = Components.utils;
     1.7 +
     1.8 +Cu.import("resource://testing-common/httpd.js");
     1.9 +
    1.10 +var httpserver = null;
    1.11 +
    1.12 +function run_test() {
    1.13 +  var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
    1.14 +  prefs.setBoolPref("geo.wifi.scan", false);
    1.15 +
    1.16 +  httpserver = new HttpServer();
    1.17 +  httpserver.start(-1);
    1.18 +  prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
    1.19 +                    httpserver.identity.primaryPort + "/geo");
    1.20 +  prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
    1.21 +  run_test_in_child("./test_geolocation_timeout.js");
    1.22 +}

mercurial