gecko/js/xpconnect/tests/unit/test_url.js
Andrea Marchesini 9e6050b059 Bug 920015 - Expose DOM URL to js modules, r=ehsan, f=emk, r=bz, r=bholley, r=smaug
--HG--
rename : js/xpconnect/tests/unit/test_textDecoder.js => js/xpconnect/tests/unit/test_url.js
2013-10-10 08:56:01 +02:00

11 lines
429 B
JavaScript

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");
}