25 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
57 CHOICEMENUITEM:
"choiceitem",
63 var NUM_CHOICEMENUITEMS = 10;
126 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
127 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
134 for (var
i = 0;
i < aNumSubCommands;
i++)
136 var cmdID = aCommand.getCommandId(aMenuID,
139 gActiveCommandLog[
i] = {CHECK_FLAG: FLAG.EXISTING,
146 _log(
"appendAction with existing commands", aMenuID);
151 _log(
"removeAction with existing commands", aMenuID);
156 _log(
"insertAction with existing commands", aMenuID);
163 aCommand.removeAllCommands(aMenuID);
165 gActiveCommandLog.length = 0;
169 _log(
"appendAction without existing commands", aMenuID);
174 _log(
"removeAction without existing commands", aMenuID);
179 _log(
"insertAction without existing commands", aMenuID);
186 aCommand.removeAllCommands(aMenuID);
187 gActiveCommandLog.length = 0;
191 _log(
"append other types of command elements", aMenuID);
196 _log(
"remove various types of command elements", aMenuID);
200 aCommand.removeAllCommands(aMenuID);
201 gActiveCommandLog.length = 0;
231 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
232 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
238 var instructions =
new Array();
239 for (var
i = 0;
i < aTestLength;
i++)
243 instructions.push({ type: FLAG.ACTION,
244 action:
"append%s"});
250 gActiveCommandLog.length,
251 "The length of the log should be "+ (aTestLength +
252 aNumSubCommands) +
", not " + gActiveCommandLog.length);
292 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
293 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
297 assertTrue((gActiveCommandLog.length >= aTestLength + aNumSubCommands),
298 "testRemoveSubobjects expected more subobjects to be present." +
299 "Have " + gActiveCommandLog.length +
" but need at least " +
300 (aTestLength + aNumSubCommands));
307 var index = gActiveCommandLog.length - 1;
308 for (var
i = 0;
i < aTestLength;
i++)
310 var checkObject = gActiveCommandLog[index];
313 aCommand.removeCommand(aMenuID, checkObject.CHECK_ID);
314 gActiveCommandLog.splice(index, 1);
322 if (index < aNumSubCommands)
324 index = gActiveCommandLog.length - 1;
365 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
366 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
369 "testInsertActions requires at least 1 command before running");
374 var instructions =
new Array();
375 for (var
i = 0;
i < aTestLength;
i++)
381 instructions.push({ type: FLAG.ACTION,
382 action:
"insert%sBefore"});
385 instructions.push({ type: FLAG.ACTION,
386 action:
"insert%sAfter"});
427 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
428 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
430 "The relevant log for the menu '" + aMenuID +
"' is expected to " +
431 "be empty when testAppendAndInsertAllTypes begins. It has a " +
432 "length of " + gActiveCommandLog.length);
436 for (var
i = 0;
i < aNumSubCommands;
i++)
438 var cmdID = aCommand.getCommandId(aMenuID,
441 gActiveCommandLog[
i] = {CHECK_FLAG: FLAG.EXISTING,
452 var instructions =
new Array();
461 var actions = [[
"append%s"],
464 [
"append%s",
"insert%sBefore"],
465 [
"append%s",
"insert%sAfter"],
466 [
"insert%sBefore",
"insert%sAfter"],
467 [
"append%s",
"insert%sBefore",
"insert%sAfter"]
475 instructions.push({type: FLAG.ACTION,
476 action: actions[0][0]});
479 while (instructions.length < aTestLength)
482 for (var flag in FLAG)
485 if (FLAG[flag] == FLAG.EXISTING ||
486 FLAG[flag] == FLAG.CHOICEMENUITEM ||
487 FLAG[flag] == FLAG.SUBMENU)
494 var
num = Math.floor(Math.random() * actions.length);
497 var currActions = actions[
num];
501 for each (var a
in currActions)
503 instructions.push({ type: FLAG[flag],
507 if (instructions.length >= aTestLength)
512 if (instructions.length >= aTestLength)
556 "aCommand is not a sbIPlaylistCommands");
563 var firstChoiceMenu =
true;
565 for each (var instruction
in aInstructions)
568 "The instruction being executed doesn't have a subobject type");
570 "The instruction being executed doesn't have an action type");
574 var functionName = instruction.action;
575 var type = instruction.type;
583 var params = [aMenuID];
589 var checkObject = {CHECK_FLAG: type,
590 CHECK_SUBMENUID: aMenuID};
597 var insertId = gActiveCommandLog[insertIndex].CHECK_ID;
599 params.push(insertId);
600 if (/Before$/.
test(functionName))
603 gActiveCommandLog.splice(insertIndex, 0, checkObject);
605 else if (/After$/.
test(functionName)) {
607 gActiveCommandLog.splice(insertIndex + 1, 0, checkObject);
610 doFail(
"Instruction had invalid action in ExecuteInstructions. Tried " +
611 "to execute '" + functionName +
"'");
615 insertIndex = (insertIndex + 3) % gActiveCommandLog.length;
617 else if (functionName.search(/
append/) != -1 ) {
619 gActiveCommandLog.push(checkObject);
622 fail(
"Received an instruction with an unrecognized function name");
629 checkObject.CHECK_ID = currId;
632 if (type != FLAG.SEPARATOR &&
633 type != FLAG.CUSTOM &&
634 type != FLAG.COMMAND)
636 params.push(currLabel, currTooltip);
637 checkObject.CHECK_LABEL = currLabel;
638 checkObject.CHECK_TOOLTIP = currTooltip;
653 checkObject.CHECK_VALUECALLBACK = ((gIDCounter % 2) == 0);
661 checkObject.CHECK_VALUECALLBACK = FLAG.VALUE +
gIDCounter;
664 case FLAG.CHOICEMENU:
667 checkObject.CHECK_VALUECALLBACK = FLAG.CHOICEMENU +
gIDCounter;
678 checkObject.CHECK_SUBACTIONS =
new Array();
681 var rand = Math.floor(Math.random() * 5);
682 for (var
p = 0;
p < rand;
p++)
684 let subId =
"subaction" +
p +
"id-in-" + currId;
685 let subLabel =
"subaction" +
p +
"label-in-" + currId;
686 let subTooltip =
"subaction" +
p +
"tooltip-in-" + currId;
688 newCommand.appendAction(
null,
693 checkObject.CHECK_SUBACTIONS
694 .push({CHECK_FLAG: FLAG.ACTION,
696 CHECK_LABEL: subLabel,
697 CHECK_TOOLTIP: subTooltip,
698 CHECK_SUBMENUID:
null});
700 params.push(newCommand);
705 aCommand[functionName].apply(
this, params);
709 if (type == FLAG.CHOICEMENU && (gIDCounter % 2 == 0 || firstChoiceMenu))
712 firstChoiceMenu =
false;
724 aFunctionName = aFunctionName.replace(/%s/,
"Action");
727 aFunctionName = aFunctionName.replace(/%s/,
"Separator");
730 aFunctionName = aFunctionName.replace(/%s/,
"Flag");
733 aFunctionName = aFunctionName.replace(/%s/,
"Value");
735 case FLAG.CHOICEMENU:
736 aFunctionName = aFunctionName.replace(/%s/,
"ChoiceMenu");
739 aFunctionName = aFunctionName.replace(/%s/,
"CustomItem");
742 aFunctionName = aFunctionName.replace(/%s/,
"PlaylistCommands");
745 fail(
"unrecognized instruction type: " + type);
747 return aFunctionName;
757 aCheckObject.CHECK_CHOICEMENUITEMS =
new Array();
758 for (var c = 0; c < NUM_CHOICEMENUITEMS; c++)
761 var currId =
"choiceitem" + c;
762 var currLabel =
"choiceitem" + c +
"label";
763 var currTooltip =
"choiceitem" + c +
"tooltip";
765 aCommand.appendChoiceMenuItem(aChoiceMenuId,
770 aCheckObject.CHECK_CHOICEMENUITEMS
771 .push({CHECK_FLAG: FLAG.CHOICEMENUITEM,
773 CHECK_LABEL: currLabel,
774 CHECK_TOOLTIP: currTooltip,
775 CHECK_SUBMENUID: aChoiceMenuId});
777 assertEqual(aCheckObject.CHECK_CHOICEMENUITEMS.length,
779 "The length of the choicemenuitem log should be "+
780 NUM_CHOICEMENUITEMS +
", not " +
781 aCheckObject.CHECK_CHOICEMENUITEMS.length);
804 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
805 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
812 for (var
i = 0;
i < aNumSubCommands;
i++)
814 var cmdID = aCommand.getCommandId(aMenuID,
817 gActiveCommandLog[
i] = {CHECK_FLAG: FLAG.EXISTING,
824 _log(
"setCommandVisibleCallback and setCommandEnabledCallback",
828 _log(
"setCommandShortcut", aMenuID);
831 _log(
"command action triggers", aMenuID);
834 _log(
"initiation and shutdown callbacks", aMenuID);
837 aCommand.removeAllCommands(aMenuID);
838 gActiveCommandLog.length = 0;
849 var isInitialized =
false;
850 var isShutdown =
false;
853 function cmds_init(context, host,
data) {
854 var implementorContext = {
856 toString:
function() {
857 return this.testString;
861 context.implementorContext = implementorContext;
862 isInitialized =
true;
865 function cmds_shutdown(context, host,
data) {
867 "shutdown callback not provided context");
869 "shutdown callback not provided implementor context");
871 context.implementorContext.QueryInterface(
Ci.nsISupportsString);
874 "shutdown callback implementor context invalid");
875 context.implementorContext =
null;
880 aCommand.setInitCallback(cmds_init);
881 aCommand.setShutdownCallback(cmds_shutdown);
884 var commandDup = aCommand.duplicate();
887 commandDup.initCommands(
"");
889 "initCommands did not call init callback!");
892 commandDup.shutdownCommands();
894 "shutdownCommands did not call shutdown callback!");
910 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
911 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
913 for (var
i = aNumSubCommands;
i < aTestLength + aNumSubCommands;
i++)
915 var checkObject = gActiveCommandLog[
i];
917 checkObject.CHECK_VIS = ((
i % 2) == 0);
919 checkObject.CHECK_VIS);
920 aCommand.setCommandVisibleCallback(aMenuID, checkObject.CHECK_ID, visCallback);
922 checkObject.CHECK_ENABLED = ((
i % 3) == 0);
924 checkObject.CHECK_ENABLED);
925 aCommand.setCommandEnabledCallback(aMenuID, checkObject.CHECK_ID, enabledCallback);
941 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
942 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
944 for (var
i = aNumSubCommands;
i < aTestLength + aNumSubCommands;
i++)
946 var checkObject = gActiveCommandLog[
i];
947 aCommand.setCommandShortcut(aMenuID,
948 checkObject.CHECK_ID,
953 checkObject.CHECK_SHORTCUT = ((
i % 2) == 0);
969 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
970 assertTrue((aNumSubCommands >= 0),
"aNumSubCommands can't be negative");
972 for (var
i = aNumSubCommands;
i < aTestLength + aNumSubCommands;
i++)
988 assertTrue((aTestLength > 0),
"A test length > 0 must be specified");
990 "aNumSubCommands can't be negative, got: " + aNumSubCommands);
992 _log(
"adding submenus", aMenuID);
996 for (var
i = 0;
i < aNumSubCommands;
i++)
998 var cmdID = aCommand.getCommandId(aMenuID,
1001 gActiveCommandLog[
i] = {CHECK_FLAG: FLAG.EXISTING,
1006 let insertCounter = 0;
1009 for (var
i = 0;
i < aTestLength;
i++)
1011 var currId = FLAG.SUBMENU +
i +
"id";
1012 var currLabel = FLAG.SUBMENU +
i +
"label";
1013 var currTooltip = FLAG.SUBMENU +
i +
"tooltip";
1016 var checkObject = {CHECK_FLAG: FLAG.SUBMENU,
1018 CHECK_LABEL: currLabel,
1019 CHECK_TOOLTIP: currTooltip,
1020 CHECK_SUBMENUID: aMenuID};
1027 aCommand.appendSubmenu(aMenuID, currId, currLabel, currTooltip);
1028 gActiveCommandLog.push(checkObject);
1032 var insertId = gActiveCommandLog[insertCounter].CHECK_ID;
1033 aCommand.insertSubmenuAfter(aMenuID,
1038 gActiveCommandLog.splice(insertCounter + 1, 0 , checkObject);
1041 insertCounter = (insertCounter + 3) % gActiveCommandLog.length;
1045 var insertId = gActiveCommandLog[insertCounter].CHECK_ID;
1046 aCommand.insertSubmenuBefore(aMenuID,
1051 gActiveCommandLog.splice(insertCounter, 0 , checkObject);
1054 insertCounter = (insertCounter + 4) % gActiveCommandLog.length;
1066 var submenuId = gActiveCommandLog[aNumSubCommands].CHECK_ID;
1067 _log(
"adding subobjects of all types to submenu", submenuId);
1071 aCommand.removeAllCommands(aMenuID);
1072 gActiveCommandLog.length = 0;
1083 return function TriggerCallback(context, submenu, commandid, host)
1088 "CommandId passed to action callback should be " + aActionID +
1089 ", not " + commandid +
"!");
1096 return function ValueCallback(context, submenu, commandid, host)
1100 "CommandId should be " + aActionID +
"in visible callback, not " +
1102 return aCallbackval;
1109 return function ValueSetter(context, submenu, commandid, host,
val)
1111 gValueChecker =
val;
1114 "CommandId should be " + aActionID +
"in visible callback, not " +
1122 return function InstantiationCallback(context, submenu, commandid, host,
doc)
1125 "instantiateCustomCommand did not forward the document");
1128 "CommandId should be " + aActionID +
" in instantiation callback" +
1129 ", not " + commandid +
"!");
1137 return function RefreshCallback(context, submenu, commandid, host,
element)
1141 "CommandId should be " + aActionID +
" in instantiation callback" +
1142 ", not " + commandid +
"!");
1144 "refreshCustomCommand did not trigger a refresh or failed to " +
1145 "forward a DOM node");
1161 for (var j = gActiveCommandLog.length-1; j >= 0; j--)
1163 var checkObject = gActiveCommandLog[j];
1165 if (typeof(checkObject.CHECK_SUBMENUID) ==
"undefined")
1166 checkObject.CHECK_SUBMENUID =
null;
1170 if (typeof(checkObject.CHECK_HOST) ==
"undefined")
1171 checkObject.CHECK_HOST =
"";
1176 assertId(aCommandObject, checkObject, j);
1180 if (checkObject.CHECK_FLAG != FLAG.SEPARATOR &&
1181 checkObject.CHECK_FLAG != FLAG.CUSTOM &&
1182 checkObject.CHECK_FLAG != FLAG.COMMAND)
1190 switch(checkObject.CHECK_FLAG)
1207 case FLAG.CHOICEMENU:
1212 if (
"CHECK_CHOICEMENUITEMS" in checkObject)
1226 case FLAG.SEPARATOR:
1248 if (aCheckObject.CHECK_FLAG == FLAG.EXISTING)
1252 var type = aCommandObject.getCommandType(aCheckObject.CHECK_SUBMENUID,
1254 aCheckObject.CHECK_HOST);
1256 aCheckObject.CHECK_FLAG,
1257 "Type should be " + aCheckObject.CHECK_FLAG +
", not " +
1260 function assertId(aCommandObject, aCheckObject, aIndex)
1264 if (aCheckObject.CHECK_FLAG == FLAG.EXISTING)
1268 var
id = aCommandObject.getCommandId(aCheckObject.CHECK_SUBMENUID,
1270 aCheckObject.CHECK_HOST);
1272 aCheckObject.CHECK_ID,
1273 "Id should be " + aCheckObject.CHECK_ID +
", not " +
id);
1279 if (aCheckObject.CHECK_FLAG == FLAG.EXISTING)
1283 var
label = aCommandObject.getCommandText(aCheckObject.CHECK_SUBMENUID,
1285 aCheckObject.CHECK_HOST);
1287 aCheckObject.CHECK_LABEL,
1288 "Label should be " + aCheckObject.CHECK_LABEL +
", not " +
1296 if (aCheckObject.CHECK_FLAG == FLAG.EXISTING)
1300 var tooltip = aCommandObject.getCommandToolTipText(aCheckObject.CHECK_SUBMENUID,
1302 aCheckObject.CHECK_HOST);
1304 aCheckObject.CHECK_TOOLTIP,
1305 "Tooltip should be " + aCheckObject.CHECK_TOOLTIP +
", not " +
1316 if (
"CHECK_VIS" in aCheckObject)
1318 var visible = aCommandObject.getCommandVisible(aCheckObject.CHECK_SUBMENUID,
1320 aCheckObject.CHECK_HOST);
1322 aCheckObject.CHECK_VIS,
1323 "getCommandVisible should have returned " + aCheckObject.CHECK_VIS +
1324 " instead of " + visible +
"!");
1327 if (
"CHECK_ENABLED" in aCheckObject)
1329 var enabled = aCommandObject.getCommandEnabled(aCheckObject.CHECK_SUBMENUID,
1331 aCheckObject.CHECK_HOST);
1333 aCheckObject.CHECK_ENABLED,
1334 "getCommandEnabled should have returned " +
1335 aCheckObject.CHECK_ENABLED +
" instead of " + enabled +
"!");
1343 if (
"CHECK_SHORTCUT" in aCheckObject)
1345 var
key = aCommandObject.getCommandShortcutKey(aCheckObject.CHECK_SUBMENUID,
1347 aCheckObject.CHECK_HOST);
1348 var code = aCommandObject.getCommandShortcutKeycode
1349 (aCheckObject.CHECK_SUBMENUID,
1351 aCheckObject.CHECK_HOST);
1352 var mod = aCommandObject.getCommandShortcutModifiers
1353 (aCheckObject.CHECK_SUBMENUID,
1355 aCheckObject.CHECK_HOST);
1356 var local = aCommandObject.getCommandShortcutLocal
1357 (aCheckObject.CHECK_SUBMENUID,
1359 aCheckObject.CHECK_HOST);
1362 "getCommandShortcutKey should have returned " +
1363 (
"key" + aIndex) +
", instead of " + key +
"!");
1366 "getCommandShortcutKeycode should have returned " +
1367 (
"keycode" + aIndex) +
", instead of " + code +
"!");
1369 "modifier" + aIndex,
1370 "getCommandShortcutModifiers should have returned " +
1371 (
"modifier" + aIndex) +
", instead of " + mod +
"!");
1373 aCheckObject.CHECK_SHORTCUT,
1374 "getCommandShortcutLocal should have returned " +
1375 aCheckObject.CHECK_SHORTCUT +
", instead of " + local+
"!");
1384 var getval = aCommandObject.getCommandValue(aCheckObject.CHECK_SUBMENUID,
1386 aCheckObject.CHECK_HOST);
1390 aCheckObject.CHECK_VALUECALLBACK =
String(aCheckObject.CHECK_VALUECALLBACK);
1393 aCheckObject.CHECK_VALUECALLBACK,
1394 "getCommandValue should have returned " +
1395 aCheckObject.CHECK_VALUECALLBACK +
", instead of " + getval +
1404 gValueChecker =
null;
1405 aCommandObject.onCommand(aCheckObject.CHECK_SUBMENUID,
1407 aCheckObject.CHECK_HOST,
1408 aCheckObject.CHECK_ID,
1409 "setvalue" + aCheckObject.CHECK_ID);
1411 "setvalue" + aCheckObject.CHECK_ID,
1412 "onCommand failed to trigger a value setter!");
1420 var checkItemArray = aCheckObject.CHECK_CHOICEMENUITEMS;
1423 var choiceMenuId = checkItemArray[0].CHECK_SUBMENUID;
1428 checkItemArray.length);
1431 for (var
i = 0;
i < checkItemArray.length;
i++)
1433 var currItemCheckObject = checkItemArray[
i];
1434 assertType(aCommandObject, currItemCheckObject,
i);
1435 assertId(aCommandObject, currItemCheckObject,
i);
1446 var subcmd = aCommandObject.getCommandSubObject(aCheckObject.CHECK_SUBMENUID,
1448 aCheckObject.CHECK_HOST);
1450 "getCommandSubObject should not have returned null!");
1453 var checkItemArray = aCheckObject.CHECK_SUBACTIONS;
1458 checkItemArray.length);
1461 for (var
i = 0;
i < aCheckObject.CHECK_SUBACTIONS;
i++)
1463 assertType(subcmd, aCheckObject.CHECK_SUBACTIONS[
i],
i);
1464 assertId(subcmd, aCheckObject.CHECK_SUBACTIONS[
i],
i);
1476 var host = (typeof(aCheckObject.CHECK_HOST) ==
"undefined") ?
1477 "" : aCheckObject.CHECK_HOST;
1478 var unusedVal =
null;
1479 aCommandObject.onCommand(aCheckObject.CHECK_SUBMENUID,
1482 aCheckObject.CHECK_ID,
1484 assertTrue(gTriggered,
"onCommand failed to trigger an action!");
1492 var
element = aCommandObject.instantiateCustomCommand
1493 (aCheckObject.CHECK_SUBMENUID,
1495 aCheckObject.CHECK_HOST,
1496 aCheckObject.CHECK_ID,
1498 element = element.QueryInterface(
Ci.nsIDOMNode);
1500 "instantiateCustomCommand should have returned dummyNode!");
1509 aCommandObject.refreshCustomCommand(aCheckObject.CHECK_SUBMENUID,
1511 aCheckObject.CHECK_HOST,
1512 aCheckObject.CHECK_ID,
1515 "refreshCustomCommand did not trigger a refresh!");
1523 var
actual = aCmds.getNumCommands(aMenuID,
"test");
1526 "Number of commands should be " + aNum +
", not " + actual +
"!");
1537 log(gTestPrefix +
" - " + aMsg + (aMenuID ?
" (" + aMenuID +
")" :
"") );
1547 if (aMenuID ==
null)
1552 for (var
i = 0;
i < gActiveCommandLog.length;
i++)
1554 if (gActiveCommandLog[
i].CHECK_ID == aMenuID)
1556 if ((typeof(gActiveCommandLog[
i].SUBMENU_LOG) ==
"undefined"))
1558 gActiveCommandLog[
i].SUBMENU_LOG =
new Array();
1560 gActiveCommandLog = gActiveCommandLog[
i].SUBMENU_LOG;
1571 var
id = type + gIDCounter +
"id";
1572 var
label = type + gIDCounter +
"label";
1573 var tooltip = type + gIDCounter +
"tooltip"
const PlaylistCommandsBuilder
function testCommandShortcut(aCommand, aMenuID, aTestLength, aNumSubCommands)
function testInsertActions(aCommand, aMenuID, aTestLength, aNumSubCommands)
function ExecuteInstructions(aCommand, aInstructions, aMenuID)
function makeInstantiationCallback(aActionID)
function makeValueSetter(aActionID)
function completeFunctionName(aType, aFunctionName)
function doc() browser.contentDocument
function assertTooltip(aCommandObject, aCheckObject, aIndex)
function assertValueSetter(aCommandObject, aCheckObject, aIndex)
function testTriggerActions(aCommand, aMenuID, aTestLength, aNumSubCommands)
function testAppendAndInsertAllTypes(aCommand, aMenuID, aTestLength, aNumSubCommands)
function assertId(aCommandObject, aCheckObject, aIndex)
function assertSubActions(aCommandObject, aCheckObject, aIndex)
sbOSDControlService prototype QueryInterface
function assertTrue(aTest, aMessage)
function assertEqual(aExpected, aActual, aMessage)
function assertShortcuts(aCommandObject, aCheckObject, aIndex)
function makeTriggerCallback(aActionID)
function assertTriggerCallback(aCommandObject, aCheckObject, aIndex)
function assertChoiceMenuItems(aCommandObject, aCheckObject, aIndex)
function getCommandData(type)
this _contentSandbox label
function assertLabel(aCommandObject, aCheckObject, aIndex)
function assertUICallbacks(aCommandObject, aCheckObject, aIndex)
this _dialogInput val(dateText)
function insert(dbq, size, name)
function testSubmenus(aCommand, aMenuID, aTestLength, aNumSubCommands)
function assertType(aCommandObject, aCheckObject, aIndex)
function assertNumCommands(aCmds, aMenuID, aNum)
function testAppendInsertRemove(aCommand, aMenuID, aTestLength, aNumSubCommands)
function addChoiceMenuItems(aCommand, aChoiceMenuId, aCheckObject)
function assertValueCallback(aCommandObject, aCheckObject, aIndex)
function _log(aMsg, aMenuID)
function makeValueCallback(aActionID, aCallbackval)
function assertLog(aCommandObject)
function testCommandCallbacksAndShortcuts(aCommand, aMenuID, aTestLength, aNumSubCommands)
function testRemoveSubobjects(aCommand, aMenuID, aTestLength, aNumSubCommands)
function makeRefreshCallback(aActionID)
function testAppendActions(aCommand, aMenuID, aTestLength, aNumSubCommands)
function testInitShutdownCB(aCommand)
function assertRefresh(aCommandObject, aCheckObject, aIndex)
function testCommandVisibleAndEnabled(aCommand, aMenuID, aTestLength, aNumSubCommands)
_getSelectedPageStyle s i
function assertInstantiate(aCommandObject, aCheckObject, aIndex)