diff --git a/browser/modules/test/browser/browser_SitePermissions_tab_urls.js b/browser/modules/test/browser/browser_SitePermissions_tab_urls.js index e13cd91ae3e5f..a004f6601d918 100644 --- a/browser/modules/test/browser/browser_SitePermissions_tab_urls.js +++ b/browser/modules/test/browser/browser_SitePermissions_tab_urls.js @@ -6,10 +6,6 @@ Cu.import("resource:///modules/SitePermissions.jsm", this); -function uri(url) { - return Services.io.newURI(url); -} - // This tests the key used to store the URI -> permission map on a tab. add_task(async function testTemporaryPermissionTabURLs() { @@ -22,15 +18,8 @@ add_task(async function testTemporaryPermissionTabURLs() { // due to the combinatory nature of the test that is hard to fix. requestLongerTimeout(2); - - let same = [ uri("https://example.com"), - uri("https://example.com/sub/path"), - uri("https://example.com:443") ] - let different = [ uri("https://example.com"), - uri("https://name:password@example.com"), - uri("https://test1.example.com"), - uri("http://example.com"), - uri("http://example.org") ] + let same = [ "https://example.com", "https://example.com/sub/path", "https://example.com:443" ].map(Services.io.newURI); + let different = [ "https://example.com", "https://name:password@example.com", "https://test1.example.com", "http://example.com", "http://example.org" ].map(Services.io.newURI); let id = "microphone"; diff --git a/image/nsIIconURI.idl b/image/nsIIconURI.idl index 77c0272502eb1..d6f393aad9912 100644 --- a/image/nsIIconURI.idl +++ b/image/nsIIconURI.idl @@ -45,7 +45,7 @@ * stock images. */ -[scriptable, builtinclass, uuid(f8fe5ef2-5f2b-43f3-857d-5b64d192c427)] +[scriptable, uuid(f8fe5ef2-5f2b-43f3-857d-5b64d192c427)] interface nsIMozIconURI : nsIURI { /// iconFile: the file URL contained within this moz-icon url, or null. diff --git a/modules/libjar/nsIJARURI.idl b/modules/libjar/nsIJARURI.idl index d7ab1115d5c97..68aefa9db868a 100644 --- a/modules/libjar/nsIJARURI.idl +++ b/modules/libjar/nsIJARURI.idl @@ -15,7 +15,7 @@ * * The nsIURL methods operate on the part of the spec. */ -[scriptable, builtinclass, uuid(646a508c-f786-4e14-be6d-8dda2a633c60)] +[scriptable, uuid(646a508c-f786-4e14-be6d-8dda2a633c60)] interface nsIJARURI : nsIURL { /** diff --git a/netwerk/base/nsIFileURL.idl b/netwerk/base/nsIFileURL.idl index 75ab6fbd60ae9..9f8b67cb81bde 100644 --- a/netwerk/base/nsIFileURL.idl +++ b/netwerk/base/nsIFileURL.idl @@ -12,7 +12,7 @@ interface nsIFile; * an URL. The URL scheme need not be file:, since other local protocols may * map URLs to files (e.g., resource:). */ -[scriptable, builtinclass, uuid(e91ac988-27c2-448b-b1a1-3822e1ef1987)] +[scriptable, uuid(e91ac988-27c2-448b-b1a1-3822e1ef1987)] interface nsIFileURL : nsIURL { /** diff --git a/netwerk/base/nsINestedURI.idl b/netwerk/base/nsINestedURI.idl index 53fc2f71532a4..48cd9b36a7944 100644 --- a/netwerk/base/nsINestedURI.idl +++ b/netwerk/base/nsINestedURI.idl @@ -21,7 +21,7 @@ interface nsIURI; * should implement nsINestedURI and return the http://example.com URI as its * inner URI. */ -[scriptable, builtinclass, uuid(6de2c874-796c-46bf-b57f-0d7bd7d6cab0)] +[scriptable, uuid(6de2c874-796c-46bf-b57f-0d7bd7d6cab0)] interface nsINestedURI : nsISupports { /** diff --git a/netwerk/base/nsIStandardURL.idl b/netwerk/base/nsIStandardURL.idl index 154bcf7ccfdc9..020555991d46b 100644 --- a/netwerk/base/nsIStandardURL.idl +++ b/netwerk/base/nsIStandardURL.idl @@ -13,7 +13,7 @@ interface nsIURI; * It supports initialization from a relative path and provides * some customization on how URLs are normalized. */ -[scriptable, builtinclass, uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81)] +[scriptable, uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81)] interface nsIStandardURL : nsIMutable { /** diff --git a/netwerk/base/nsIURI.idl b/netwerk/base/nsIURI.idl index 381bddb268e7d..30d3ef292b403 100644 --- a/netwerk/base/nsIURI.idl +++ b/netwerk/base/nsIURI.idl @@ -71,7 +71,7 @@ class Encoding; * we will need to add additional checks there for all intermediate IIDs, until * ContentPrincipal is fixed to serialize its URIs as nsISupports (bug 662693). */ -[scriptable, builtinclass, uuid(92073a54-6d78-4f30-913a-b871813208c6)] +[scriptable, uuid(92073a54-6d78-4f30-913a-b871813208c6)] interface nsIURI : nsISupports { /************************************************************************ diff --git a/netwerk/base/nsIURIWithBlobImpl.idl b/netwerk/base/nsIURIWithBlobImpl.idl index e76c12c7ed26f..d055746ccedbe 100644 --- a/netwerk/base/nsIURIWithBlobImpl.idl +++ b/netwerk/base/nsIURIWithBlobImpl.idl @@ -10,7 +10,7 @@ interface nsIURI; * nsIURIWithBlobImpl is implemented by URIs which are associated with a * specific BlobImpl. */ -[builtinclass, builtinclass, uuid(331b41d3-3506-4ab5-bef9-aab41e3202a3)] +[builtinclass, uuid(331b41d3-3506-4ab5-bef9-aab41e3202a3)] interface nsIURIWithBlobImpl : nsISupports { /** diff --git a/netwerk/base/nsIURIWithPrincipal.idl b/netwerk/base/nsIURIWithPrincipal.idl index 912225c909724..6c63aaad9b25d 100644 --- a/netwerk/base/nsIURIWithPrincipal.idl +++ b/netwerk/base/nsIURIWithPrincipal.idl @@ -11,7 +11,7 @@ interface nsIURI; * nsIURIWithPrincipal is implemented by URIs which are associated with a * specific principal. */ -[scriptable, builtinclass, uuid(626a5c0c-bfd8-4531-8b47-a8451b0daa33)] +[scriptable, uuid(626a5c0c-bfd8-4531-8b47-a8451b0daa33)] interface nsIURIWithPrincipal : nsISupports { /** diff --git a/netwerk/base/nsIURL.idl b/netwerk/base/nsIURL.idl index 4a4cc03c7a0ba..9ff6c3dcda348 100644 --- a/netwerk/base/nsIURL.idl +++ b/netwerk/base/nsIURL.idl @@ -19,7 +19,7 @@ * | * filePath */ -[scriptable, builtinclass, uuid(86adcd89-0b70-47a2-b0fe-5bb2c5f37e31)] +[scriptable, uuid(86adcd89-0b70-47a2-b0fe-5bb2c5f37e31)] interface nsIURL : nsIURI { /************************************************************************* diff --git a/netwerk/test/unit/test_bug365133.js b/netwerk/test/unit/test_bug365133.js index eb1b100abda49..d905f8ae4d1ed 100644 --- a/netwerk/test/unit/test_bug365133.js +++ b/netwerk/test/unit/test_bug365133.js @@ -1,5 +1,4 @@ const URL = "ftp://localhost/bug365133/"; -Cu.import("resource://gre/modules/NetUtil.jsm"); const tests = [ [ /* Unix style listing, space at the end of filename */ @@ -76,7 +75,11 @@ function storeData() { createInstance(Ci.nsIStringInputStream); stream.data = tests[0][0]; - var url = NetUtil.newURI(URL); + var url = { + password: "", + asciiSpec: URL, + QueryInterface: XPCOMUtils.generateQI([Ci.nsIURI]) + }; var channel = { URI: url, diff --git a/netwerk/test/unit/test_bug484684.js b/netwerk/test/unit/test_bug484684.js index cb6f970782550..259d8cec1bfcf 100644 --- a/netwerk/test/unit/test_bug484684.js +++ b/netwerk/test/unit/test_bug484684.js @@ -1,5 +1,4 @@ const URL = "ftp://localhost/bug464884/"; -Cu.import("resource://gre/modules/NetUtil.jsm"); const tests = [ // standard ls unix format @@ -80,7 +79,11 @@ function storeData(status, entry) { createInstance(Ci.nsIStringInputStream); stream.data = tests[0][0]; - var url = NetUtil.newURI(URL); + var url = { + password: "", + asciiSpec: URL, + QueryInterface: XPCOMUtils.generateQI([Ci.nsIURI]) + }; var channel = { URI: url, diff --git a/netwerk/test/unit/test_bug515583.js b/netwerk/test/unit/test_bug515583.js index c9171b0ebfe29..28e43a3de9a0d 100644 --- a/netwerk/test/unit/test_bug515583.js +++ b/netwerk/test/unit/test_bug515583.js @@ -1,5 +1,4 @@ const URL = "ftp://localhost/bug515583/"; -Cu.import("resource://gre/modules/NetUtil.jsm"); const tests = [ ["[RWCEM1 4 1-MAR-1993 18:09:01.12\r\n" + @@ -38,7 +37,11 @@ function storeData(status, entry) { createInstance(Ci.nsIStringInputStream); stream.data = tests[0][0]; - var url = NetUtil.newURI(URL); + var url = { + password: "", + asciiSpec: URL, + QueryInterface: XPCOMUtils.generateQI([Ci.nsIURI]) + }; var channel = { URI: url, diff --git a/netwerk/test/unit/test_bug543805.js b/netwerk/test/unit/test_bug543805.js index 8cb60e0858ace..ed25f3ebed438 100644 --- a/netwerk/test/unit/test_bug543805.js +++ b/netwerk/test/unit/test_bug543805.js @@ -1,5 +1,4 @@ const URL = "ftp://localhost/bug543805/"; -Cu.import("resource://gre/modules/NetUtil.jsm"); var dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; var year = new Date().getFullYear().toString(); @@ -58,7 +57,11 @@ function storeData(status, entry) { createInstance(Ci.nsIStringInputStream); stream.data = tests[0][0]; - var url = NetUtil.newURI(URL); + var url = { + password: "", + asciiSpec: URL, + QueryInterface: XPCOMUtils.generateQI([Ci.nsIURI]) + }; var channel = { URI: url,