michael@0: this.EXPORTED_SYMBOLS = ['checkFromJSM']; michael@0: michael@0: this.checkFromJSM = function checkFromJSM(ok, is) { michael@0: Components.utils.importGlobalProperties(['URL']); michael@0: michael@0: var url = new URL('http://www.example.com'); michael@0: is(url.href, "http://www.example.com/", "JSM should have URL"); michael@0: michael@0: var url2 = new URL('/foobar', url); michael@0: is(url2.href, "http://www.example.com/foobar", "JSM should have URL - based on another URL"); michael@0: michael@0: var blob = new Blob(['a']); michael@0: var url = URL.createObjectURL(blob); michael@0: ok(url, "URL is created!"); michael@0: michael@0: URL.revokeObjectURL(url); michael@0: ok(true, "URL is revoked"); michael@0: }