B2G/gecko/toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js
/*
 * 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.
 */
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.
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");
  if (crashlinks.length == crashes.length) {
    for(let i=0; i<crashes.length; i++) {
      is(crashlinks[i].id, crashes[i].id, i + ": crash ID is correct");
      if (crashes[i].pending) {
        is(crashlinks[i].getAttribute("href"),
          "http://example.com/browser/toolkit/crashreporter/about/throttling",
          "pending URL links to the correct static page");
      }
    }
  }
}
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" ) ; if ( crashlinks . length == crashes . length ) { for ( let i = 0 ; i < crashes . length ; i ++ ) { is ( crashlinks [ i ] . id , crashes [ i ] . id , i + ": crash ID is correct" ) ; if ( crashes [ i ] . pending ) { is ( crashlinks [ i ] . getAttribute ( "href" ) , "http://example.com/browser/toolkit/crashreporter/about/throttling" , "pending URL links to the correct static page" ) ; } } } }
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.
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 .
// no point in checking this if the lists aren't the same length // we set the breakpad.reportURL pref in test()