// load our utility script var scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); scriptLoader.loadSubScript("chrome://mochikit/content/browser/toolkit/crashreporter/test/browser/aboutcrashes_utils.js", this); function cleanup_and_finish() { try { cleanup_fake_appdir(); } catch(ex) {} let prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); prefs.clearUserPref("breakpad.reportURL"); gBrowser.removeTab(gBrowser.selectedTab); finish(); } /* * check_crash_list * * Check that the list of crashes displayed by about:crashes matches * the list of crashes that we placed in the pending+submitted directories. */ function check_crash_list(tab, crashes) { let doc = gBrowser.getBrowserForTab(tab).contentDocument; let crashlinks = doc.getElementById("tbody").getElementsByTagName("a"); is(crashlinks.length, crashes.length, "about:crashes lists correct number of crash reports"); // no point in checking this if the lists aren't the same length if (crashlinks.length == crashes.length) { for(let i=0; i