summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_url.js
blob: da2502800ebc3da76cffc3f91db0dc291ee5162e (plain)
1
2
3
4
5
6
7
8
9
10
function run_test() {
  var Cu = Components.utils;
  var sb = new Cu.Sandbox('http://www.example.com',
                          { wantGlobalProperties: ["URL"] });
  sb.do_check_eq = do_check_eq;
  Cu.evalInSandbox('do_check_eq(new URL("http://www.example.com").host, "www.example.com");',
                   sb);
  Cu.importGlobalProperties(["URL"]);
  do_check_eq(new URL("http://www.example.com").host, "www.example.com");
}