B2G/gecko/toolkit/mozapps/extensions/test/browser/browser_bug591663.js
/**
 * Check that the list view is as expected
 *
 * @param  aItem
 *         The expected item in the list, or null if list should be empty
 */
Check that the list view is as expected
@param  aItem
The expected item in the list, or null if list should be empty
Check that the list view is as expected @param aItem The expected item in the list or null if list should be empty
function check_list(aItem) {
  let emptyNotice = gManagerWindow.document.getElementById(EMPTY_ID);
  ok(emptyNotice != null, "Should have found the empty notice");
  is(!emptyNotice.hidden, (aItem == null), "Empty notice should be showing if list empty");
  let list = gManagerWindow.document.getElementById(LIST_ID);
  is(list.itemCount, aItem ? 1 : 0, "Should get expected number of items in list");
  if (aItem != null) {
    let itemName = list.firstChild.getAttribute("name");
    is(itemName, aItem.name, "List item should have correct name");
  }
}
function check_list ( aItem ) { let emptyNotice = gManagerWindow . document . getElementById ( EMPTY_ID ) ; ok ( emptyNotice != null , "Should have found the empty notice" ) ; is ( ! emptyNotice . hidden , ( aItem == null ) , "Empty notice should be showing if list empty" ) ; let list = gManagerWindow . document . getElementById ( LIST_ID ) ; is ( list . itemCount , aItem ? 1 : 0 , "Should get expected number of items in list" ) ; if ( aItem != null ) { let itemName = list . firstChild . getAttribute ( "name" ) ; is ( itemName , aItem . name , "List item should have correct name" ) ; } }
Check that the list view is as expected
 @param  aItem
         The expected item in the list, or null if list should be empty
Check that the list view is as expected @param aItem The expected item in the list or null if list should be empty
// Check state of the empty notice // Check the children of the list