browser_bug1535877.js (465B)
1 "use strict"; 2 3 add_task(_ => { 4 // Check that create instance and the service getter all return the same object. 5 let etld = Cc["@mozilla.org/network/effective-tld-service;1"].createInstance( 6 Ci.nsIEffectiveTLDService 7 ); 8 9 Assert.equal(etld, Services.eTLD); 10 11 // eslint-disable-next-line mozilla/use-services 12 let etld2 = Cc["@mozilla.org/network/effective-tld-service;1"].getService( 13 Ci.nsIEffectiveTLDService 14 ); 15 16 Assert.equal(etld, etld2); 17 });