diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/url/tests/file_url.jsm | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/url/tests/file_url.jsm')
-rw-r--r-- | dom/url/tests/file_url.jsm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dom/url/tests/file_url.jsm b/dom/url/tests/file_url.jsm new file mode 100644 index 000000000..a90f8c95d --- /dev/null +++ b/dom/url/tests/file_url.jsm @@ -0,0 +1,22 @@ +this.EXPORTED_SYMBOLS = ['checkFromJSM']; + +this.checkFromJSM = function checkFromJSM(ok, is) { + Components.utils.importGlobalProperties(['URL', 'Blob']); + + var url = new URL('http://www.example.com'); + is(url.href, "http://www.example.com/", "JSM should have URL"); + + var url2 = new URL('/foobar', url); + is(url2.href, "http://www.example.com/foobar", "JSM should have URL - based on another URL"); + + var blob = new Blob(['a']); + var url = URL.createObjectURL(blob); + ok(url, "URL is created!"); + + var u = new URL(url); + ok(u, "URL created"); + is(u.origin, "null", "Url doesn't have an origin if created in a JSM"); + + URL.revokeObjectURL(url); + ok(true, "URL is revoked"); +} |