1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/base/test/file_url.jsm Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,18 @@ 1.4 +this.EXPORTED_SYMBOLS = ['checkFromJSM']; 1.5 + 1.6 +this.checkFromJSM = function checkFromJSM(ok, is) { 1.7 + Components.utils.importGlobalProperties(['URL']); 1.8 + 1.9 + var url = new URL('http://www.example.com'); 1.10 + is(url.href, "http://www.example.com/", "JSM should have URL"); 1.11 + 1.12 + var url2 = new URL('/foobar', url); 1.13 + is(url2.href, "http://www.example.com/foobar", "JSM should have URL - based on another URL"); 1.14 + 1.15 + var blob = new Blob(['a']); 1.16 + var url = URL.createObjectURL(blob); 1.17 + ok(url, "URL is created!"); 1.18 + 1.19 + URL.revokeObjectURL(url); 1.20 + ok(true, "URL is revoked"); 1.21 +}