js/xpconnect/tests/unit/test_url.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/tests/unit/test_url.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,10 @@
     1.4 +function run_test() {
     1.5 +  var Cu = Components.utils;
     1.6 +  var sb = new Cu.Sandbox('http://www.example.com',
     1.7 +                          { wantGlobalProperties: ["URL"] });
     1.8 +  sb.do_check_eq = do_check_eq;
     1.9 +  Cu.evalInSandbox('do_check_eq(new URL("http://www.example.com").host, "www.example.com");',
    1.10 +                   sb);
    1.11 +  Cu.importGlobalProperties(["URL"]);
    1.12 +  do_check_eq(new URL("http://www.example.com").host, "www.example.com");
    1.13 +}

mercurial