test_comp_no_aslr.js 659 B

12345678910111213141516171819
  1. Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
  2. var Cc = Components.classes;
  3. var Ci = Components.interfaces;
  4. function run_test() {
  5. let manifest = do_get_file('components/testcompnoaslr.manifest');
  6. registerAppManifest(manifest);
  7. var sysInfo = Cc["@mozilla.org/system-info;1"].
  8. getService(Ci.nsIPropertyBag2);
  9. var ver = parseFloat(sysInfo.getProperty("version"));
  10. if (ver < 6.0) {
  11. // This is disabled on pre-Vista OSs.
  12. do_check_true("{335fb596-e52d-418f-b01c-1bf16ce5e7e4}" in Components.classesByID);
  13. } else {
  14. do_check_false("{335fb596-e52d-418f-b01c-1bf16ce5e7e4}" in Components.classesByID);
  15. }
  16. }