diff options
Diffstat (limited to 'js/xpconnect/tests/unit/test_url.js')
-rw-r--r-- | js/xpconnect/tests/unit/test_url.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/test_url.js b/js/xpconnect/tests/unit/test_url.js new file mode 100644 index 000000000..da2502800 --- /dev/null +++ b/js/xpconnect/tests/unit/test_url.js @@ -0,0 +1,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"); +} |