31 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
33 function DBG(s) {
log(
'DBG:test_servicepane: '+s); }
36 classId: Components.ID(
"{0da5eace-1dd2-11b2-a64a-eb82fc5ef0c3}"),
38 contractId:
"@songbirdnest.com/servicepane/test-module;1",
44 _processEvents:
function() {
45 let mainThread =
Cc[
"@mozilla.org/thread-manager;1"]
46 .getService(
Ci.nsIThreadManager)
48 while (mainThread.hasPendingEvents())
49 mainThread.processNextEvent(
true);
52 addToCategory:
function() {
53 if (!this._registered) {
55 let
registrar = Components.manager.QueryInterface(
Ci.nsIComponentRegistrar);
57 this.contractId,
this);
58 this._registered =
true;
61 this._servicePaneInitParams =
null;
63 let catMgr =
Cc[
"@mozilla.org/categorymanager;1"]
64 .getService(
Ci.nsICategoryManager);
65 catMgr.addCategoryEntry(
"service-pane",
"service," + this.contractId,
66 this.contractId,
false,
true);
69 this._processEvents();
72 return this._servicePaneInitParams;
75 removeFromCategory:
function() {
76 let catMgr =
Cc[
"@mozilla.org/categorymanager;1"]
77 .getService(
Ci.nsICategoryManager);
78 catMgr.deleteCategoryEntry(
"service-pane",
"service," + this.contractId,
81 if (this._registered) {
82 let
registrar = Components.manager.QueryInterface(
Ci.nsIComponentRegistrar);
83 registrar.unregisterFactory(this.classId,
this);
84 this._registered =
false;
88 this._processEvents();
95 _servicePaneInitParams:
null,
97 DBG(
"testModule.servicePaneInit() called");
101 _fillContextMenuParams:
null,
102 fillContextMenu:
function() {
103 DBG(
"testModule.fillContextMenu() called");
107 _fillNewItemMenuParams:
null,
108 fillNewItemMenu:
function() {
109 DBG(
"testModule.fillNewItemMenu() called");
113 _onSelectionChangedParams:
null,
114 onSelectionChanged:
function() {
115 DBG(
"testModule.onSelectionChanged() called");
116 this._onSelectionChangedParams =
arguments;
119 _canDropParams:
null,
120 _canDropResult:
false,
121 canDrop:
function() {
122 DBG(
"testModule.canDrop() called");
124 return this._canDropResult;
129 DBG(
"testModule.onDrop() called");
133 _onDragGestureParams:
null,
134 _onDragGestureResult:
false,
135 onDragGesture:
function() {
136 DBG(
"testModule.onDragGesture() called");
138 return this._onDragGestureResult;
141 _onBeforeRenameParams:
null,
142 onBeforeRename:
function() {
143 DBG(
"testModule.onBeforeRename() called");
147 _onRenameParams:
null,
148 onRename:
function() {
149 DBG(
"testModule.onRename() called");
165 aNode.setAttribute(
"foo",
"bar");
172 aNode.setAttribute(
"foo",
"baz");
175 aNode.removeAttribute(
"foo");
182 aNode.setAttributeNS(
"ns",
"foo",
"bar");
183 assertEqual(aNode.getAttributeNS(
"ns",
"foo"),
"bar");
186 assertTrue(aNode.hasAttributeNS(
"ns",
"foo"));
187 assertFalse(aNode.hasAttributeNS(
"wrongns",
"foo"));
191 aNode.setAttributeNS(
"ns",
"foo",
"baz");
194 aNode.removeAttribute(
"foo");
195 aNode.removeAttributeNS(
"wrongns",
"foo");
198 aNode.removeAttributeNS(
"ns",
"foo");
205 aNode.setAttribute(
"foo",
"bar");
206 aNode.setAttribute(
"bar",
"foo");
207 aNode.setAttributeNS(
"ns",
"foo",
"baz");
211 assertTrue(aNode.hasAttributeNS(
"ns",
"foo"));
213 aNode.removeAttribute(
"foo");
216 aNode.removeAttribute(
"wrongns",
"foo");
219 aNode.removeAttributeNS(
"ns",
"foo");
222 aNode.removeAttribute(
"bar");
230 let stringProps = [
"id",
"className",
"url",
"image",
"name",
"tooltip",
231 "contractid",
"stringbundle",
"dndDragTypes",
232 "dndAcceptNear",
"dndAcceptIn",
"contentPrefix"];
233 for each (let prop
in stringProps) {
234 DBG(
"Testing node property " + prop);
237 let attr = (prop ==
"className" ?
"class" : prop);
257 let booleanProps = {
hidden:
false, editable:
false, isOpen:
true};
258 for (let prop in booleanProps) {
259 DBG(
"Testing node property " + prop);
261 let defaultVal = booleanProps[prop];
267 aNode[prop] = !defaultVal;
268 assertEqual(aNode.getAttribute(prop), defaultVal ?
"false" :
"true");
272 aNode[prop] = defaultVal;
273 assertEqual(aNode.getAttribute(prop), defaultVal ?
"true" :
"false");
277 aNode.removeAttribute(prop);
283 aNode.className =
"class1 class2";
287 aNode.properties =
null;
291 aNode.name =
"&test_dummy";
294 aNode.stringbundle =
"data:text/plain,test_dummy=foo";
297 aNode.name =
"test_dummy";
300 aNode.name =
"&test_dummy";
303 aNode.stringbundle =
"data:text/plain,test_dummy=bar";
306 aNode.stringbundle =
null;
310 testModule.addToCategory();
311 testModule.stringbundle =
"data:text/plain,test_dummy=module-foo";
312 aNode.contractid = testModule.contractId;
315 aNode.contractid =
null;
319 testModule.removeFromCategory();
320 aNode.contractid = testModule.contractId;
323 aNode.contractid =
null;
338 let node1 = SPS.createNode();
342 let node2 = SPS.createNode();
346 let node3 = SPS.createNode();
358 aRoot.appendChild(node1);
359 node1.appendChild(node2);
363 aRoot.appendChild(node3);
384 aRoot.appendChild(node2);
387 aRoot.appendChild(node1);
391 aRoot.removeChild(node3);
395 hadException =
false;
397 node1.removeChild(node2);
404 hadException =
false;
406 node1.removeChild(node3);
414 aRoot.insertBefore(node3, node1);
418 aRoot.insertBefore(node3, node2);
441 hadException =
false;
443 node1.insertBefore(node3, node2);
450 aRoot.removeChild(node2);
451 hadException =
false;
453 node1.insertBefore(node3, node2);
461 aRoot.replaceChild(node2, node1);
465 aRoot.replaceChild(node3, node2);
469 hadException =
false;
471 aRoot.replaceChild(node1, node2);
478 node3.appendChild(node2);
479 hadException =
false;
481 aRoot.replaceChild(node1, node2);
489 let rootParent = aRoot.parentNode;
490 hadException =
false;
492 aRoot.appendChild(aRoot)
499 hadException =
false;
501 node3.appendChild(aRoot)
508 hadException =
false;
510 node2.appendChild(aRoot)
520 aRoot.removeChild(node3);
527 let methods = {
id:
"getNode",
url:
"getNodeForURL"};
530 let node1 = SPS.createNode();
532 node1.id =
"id_node1";
533 node1.url =
"url_node1";
535 let node2 = SPS.createNode();
537 node2.id =
"id_node2";
538 node2.url =
"url_node2";
542 let method = methods[attr];
548 aRoot.appendChild(node2);
549 aRoot.insertBefore(node1, node2);
551 let method = methods[attr];
557 node1.appendChild(node2);
559 let method = methods[attr];
565 aRoot.removeChild(node1);
567 let method = methods[attr];
573 aRoot.appendChild(node1);
575 let method = methods[attr];
581 node1.id =
"id_node3";
582 node1.url =
"url_node3";
584 let method = methods[attr];
591 node1.id =
"id_node1";
592 node1.url =
"url_node1";
594 let method = methods[attr];
601 node2.id =
"id_node1";
602 node2.url =
"url_node1";
604 let method = methods[attr];
605 let
node = SPS[method](attr +
"_node1");
610 node2.id =
"id_node2";
611 node2.url =
"url_node2";
613 let method = methods[attr];
622 let method = methods[attr];
629 node1.setAttribute(
"foo",
"bar");
630 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"bar");
632 assertEqual(nodes.queryElementAt(0,
Ci.sbIServicePaneNode), node1);
634 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"not bar");
637 nodes = SPS.getNodesByAttributeNS(
"wrongns",
"foo",
"bar");
640 node2.setAttribute(
"foo",
"not bar")
641 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"bar");
643 assertEqual(nodes.queryElementAt(0,
Ci.sbIServicePaneNode), node1);
645 node2.setAttribute(
"foo",
"bar")
646 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"bar");
649 node1.removeAttribute(
"foo");
650 node2.removeAttribute(
"foo");
651 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"bar");
655 node1.setAttributeNS(
"ns",
"foo",
"bar");
656 nodes = SPS.getNodesByAttributeNS(
"ns",
"foo",
"bar");
658 assertEqual(nodes.queryElementAt(0,
Ci.sbIServicePaneNode), node1);
660 nodes = SPS.getNodesByAttributeNS(
"ns",
"foo",
"not bar");
663 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"bar");
666 node2.setAttributeNS(
"ns",
"foo",
"not bar")
667 nodes = SPS.getNodesByAttributeNS(
"ns",
"foo",
"bar");
669 assertEqual(nodes.queryElementAt(0,
Ci.sbIServicePaneNode), node1);
671 node2.setAttributeNS(
"ns",
"foo",
"bar")
672 nodes = SPS.getNodesByAttributeNS(
"ns",
"foo",
"bar");
675 node1.removeAttributeNS(
"ns",
"foo");
676 node2.removeAttributeNS(
"ns",
"foo");
677 nodes = SPS.getNodesByAttributeNS(
"ns",
"foo",
"bar");
681 node1.setAttribute(
"foo",
"bar");
682 aRoot.removeChild(node1);
683 nodes = SPS.getNodesByAttributeNS(
null,
"foo",
"bar");
693 let node1 = SPS.addNode(
"node1", aRoot,
true);
702 let node2 = SPS.addNode(
null, aRoot,
true);
710 let node3 = SPS.addNode(
null, aRoot,
false);
717 SPS.removeNode(node2);
723 aRoot.removeChild(node1);
724 aRoot.removeChild(node3);
729 aRoot.id =
"test-root";
730 aRoot.editable =
"true";
732 function FakeElement(aTagName) {
733 this.tagName = aTagName;
735 FakeElement.prototype = {
737 setAttribute:
function FakeElement_setAttribute(aAttr, aVal) void(0),
738 appendChild:
function FakeElement_appendChild(aChild) void(0),
739 get ownerDocument() ({
740 createElement:
function fakeDocument_createElement(aTagName) {
741 return new FakeElement(aTagName);
744 get wrappedJSObject()
this
746 let fakeElement =
new FakeElement();
749 get wrappedJSObject()
this
753 let initArgs = testModule.addToCategory();
758 testModule._fillContextMenuParams =
null;
759 SPS.fillContextMenu(aRoot, fakeElement, fakeWindow);
761 assertEqual(testModule._fillContextMenuParams.length, 3);
762 assertEqual(testModule._fillContextMenuParams[0], aRoot);
763 assertEqual(testModule._fillContextMenuParams[1].wrappedJSObject, fakeElement);
764 assertEqual(testModule._fillContextMenuParams[2].wrappedJSObject, fakeWindow);
765 testModule._fillContextMenuParams =
null;
769 testModule._fillNewItemMenuParams =
null;
770 SPS.fillNewItemMenu(aRoot, fakeElement, fakeWindow);
772 assertEqual(testModule._fillNewItemMenuParams.length, 3);
773 assertEqual(testModule._fillNewItemMenuParams[0], aRoot);
774 assertEqual(testModule._fillNewItemMenuParams[1].wrappedJSObject, fakeElement);
775 assertEqual(testModule._fillNewItemMenuParams[2].wrappedJSObject, fakeWindow);
776 testModule._fillNewItemMenuParams =
null;
780 testModule._onSelectionChangedParams =
null;
781 SPS.onSelectionChanged(aRoot, fakeElement, fakeWindow);
783 assertEqual(testModule._onSelectionChangedParams.length, 3);
784 assertEqual(testModule._onSelectionChangedParams[0], aRoot);
785 assertEqual(testModule._onSelectionChangedParams[1].wrappedJSObject, fakeElement);
786 assertEqual(testModule._onSelectionChangedParams[2].wrappedJSObject, fakeWindow);
787 testModule._onSelectionChangedParams =
null;
790 aRoot.contractid = testModule.contractId;
791 testModule._onBeforeRenameParams =
null;
792 SPS.onBeforeRename(aRoot);
795 testModule._onBeforeRenameParams =
null;
796 aRoot.contractid =
null;
799 aRoot.contractid = testModule.contractId;
800 testModule._onRenameParams =
null;
801 SPS.onRename(aRoot,
"Dummy title");
804 testModule._onRenameParams =
null;
805 aRoot.contractid =
null;
808 testModule.removeFromCategory();
810 testModule._fillContextMenuParams =
null;
811 SPS.fillContextMenu(aRoot, fakeElement, fakeWindow);
813 testModule._fillContextMenuParams =
null;
815 testModule._fillNewItemMenuParams =
null;
816 SPS.fillNewItemMenu(aRoot, fakeElement, fakeWindow);
818 testModule._fillNewItemMenuParams =
null;
820 testModule._onSelectionChangedParams =
null;
821 SPS.onSelectionChanged(aRoot, fakeElement, fakeWindow);
823 testModule._onSelectionChangedParams =
null;
825 aRoot.contractid = testModule.contractId;
826 testModule._onRenameParams =
null;
827 SPS.onRename(aRoot,
"Dummy title");
829 aRoot.contractid =
null;
830 testModule._onRenameParams =
null;
834 aRoot.removeAttribute(
"editable");
840 let hadException =
false;
845 attrModified:
function(aNode, aAttrName, aNamespace, aOldValue, aNewValue) {
846 calls.push([
"attrModified", aNode, aAttrName, aNamespace, aOldValue, aNewValue]);
850 calls.push([
"nodeInserted", aNode, aParent, aBefore]);
854 calls.push([
"nodeRemoved", aNode, aParent]);
858 let node1 = SPS.createNode();
861 let node2 = SPS.createNode();
865 SPS.root.addMutationListener(testListener);
866 node1.addMutationListener(testListener);
867 node1.setAttribute(
"foo",
"bar");
868 node1.removeAttribute(
"foo",
"bar");
869 node1.appendChild(node2);
870 node1.removeChild(node2);
872 SPS.root.removeMutationListener(testListener);
875 aRoot.appendChild(node1);
881 node1.appendChild(node2);
887 node1.removeChild(node2);
893 aRoot.removeChild(node1);
896 aRoot.appendChild(node1);
900 aRoot.insertBefore(node2, node1);
904 node1.removeMutationListener(testListener);
905 aRoot.addMutationListener(testListener);
906 aRoot.insertBefore(node1, node2);
910 aRoot.removeChild(node2);
914 aRoot.replaceChild(node2, node1);
921 node2.setAttribute(
"foo",
"bar");
926 node2.setAttribute(
"foo",
"baz");
931 node2.removeAttribute(
"foo");
936 node2.setAttributeNS(
"ns",
"foo",
"bar");
941 node2.removeAttributeNS(
"ns",
"foo");
947 aRoot.removeMutationListener(testListener);
948 node2.addMutationListener(testListener);
950 node2.setAttribute(
"foo",
"bar");
955 node2.setAttribute(
"foo",
"baz");
960 node2.removeAttribute(
"foo");
965 node2.setAttributeNS(
"ns",
"foo",
"bar");
970 node2.removeAttributeNS(
"ns",
"foo");
976 node2.removeMutationListener(testListener);
977 let modifyingListener = {
980 attrModified:
function(aNode, aAttrName, aNamespace, aOldValue, aNewValue) {},
983 if (aNode == node2 && aParent == node1)
984 aRoot.appendChild(node2);
989 aRoot.appendChild(node1);
990 aRoot.addMutationListener(modifyingListener);
991 aRoot.addMutationListener(testListener);
992 node1.appendChild(node2);
998 aRoot.removeMutationListener(modifyingListener);
999 aRoot.removeMutationListener(testListener);
1002 modifyingListener = {
1003 QueryInterface: XPCOMUtils.generateQI([
Ci.sbIServicePaneMutationListener]),
1005 attrModified:
function(aNode, aAttrName, aNamespace, aOldValue, aNewValue) {},
1011 aParent.appendChild(node2);
1014 aRoot.addMutationListener(modifyingListener);
1015 aRoot.addMutationListener(testListener);
1016 aRoot.removeChild(node2);
1020 aRoot.removeMutationListener(modifyingListener);
1021 aRoot.removeMutationListener(testListener);
1025 modifyingListener = {
1026 QueryInterface: XPCOMUtils.generateQI([
Ci.sbIServicePaneMutationListener]),
1028 attrModified:
function(aNode, aAttrName, aNamespace, aOldValue, aNewValue) {},
1033 aParent.appendChild(aNode);
1036 aRoot.addMutationListener(modifyingListener);
1037 hadException =
false;
1039 node1.appendChild(node2);
1042 hadException =
true;
1044 assertTrue(hadException,
"mutation listener prevented removing the node - insertBefore should throw");
1045 assertEqual(node2.parentNode, aRoot,
"node wasn't moved, mutation listener prevented that");
1046 aRoot.removeMutationListener(modifyingListener);
1048 modifyingListener = {
1049 QueryInterface: XPCOMUtils.generateQI([
Ci.sbIServicePaneMutationListener]),
1051 attrModified:
function(aNode, aAttrName, aNamespace, aOldValue, aNewValue) {},
1056 aParent.removeChild(node1);
1059 aRoot.addMutationListener(modifyingListener);
1060 hadException =
false;
1062 aRoot.insertBefore(node2, node1);
1065 hadException =
true;
1067 assertTrue(hadException,
"mutation listener removed our anchor node - insertBefore should throw");
1068 assertEqual(node2.parentNode,
null,
"node2 was removed but mutation listener prevented inserting");
1069 aRoot.removeMutationListener(modifyingListener);
1070 aRoot.appendChild(node2);
1075 nodePropertyChanged:
function(aNodeId, aProperty) {
1076 calls.push([aNodeId, aProperty]);
1079 SPS.addListener(testListener);
1081 node2.setAttribute(
"foo",
"bar");
1086 node2.removeAttribute(
"foo");
1091 node2.setAttributeNS(
"http://example.com/",
"foo",
"bar");
1096 node2.removeAttributeNS(
"http://example.com/",
"foo");
1101 let node3 = SPS.addNode(
"node3", aRoot,
true);
1107 SPS.removeListener(testListener);
1109 node2.setAttribute(
"foo",
"bar");
1113 aRoot.removeChild(node2);
1114 aRoot.removeChild(node3);
1119 var
node = SPS.createNode();
1121 var prefix =
"prefix/";
1122 node.url = prefix +
"node";
1123 node.contentPrefix = prefix;
1126 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_EXACT),
null,
1127 "getNodeForURL should return null when the node has not been added");
1128 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_PREFIX),
null,
1129 "getNodeForURL should return null when the node has not been added");
1130 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_EXACT),
null,
1131 "getNodeForURL should return null when the node has not been added");
1132 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_PREFIX),
null,
1133 "getNodeForURL should return null when the node has not been added");
1134 assertEqual(SPS.getNodeForURL(
"other/other", SPS.URL_MATCH_PREFIX),
null,
1135 "getNodeForURL should return null when the node has not been added");
1138 aRoot.appendChild(node);
1139 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_EXACT),
node,
1140 "an exact match for a node's url should return the node");
1141 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_PREFIX),
node,
1142 "prefix matches for exact urls should return a node");
1143 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_EXACT),
null,
1144 "exact matches for the wrong url should return null");
1145 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_PREFIX),
node,
1146 "prefix matches for urls with the right prefix should return a node");
1147 assertEqual(SPS.getNodeForURL(
"other/other", SPS.URL_MATCH_PREFIX),
null,
1148 "prefix matches for urls with the wrong prefix should return null");
1152 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_EXACT),
null,
1153 "exact matches should return null if nodes don't have url attributes");
1154 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_PREFIX),
node,
1155 "prefix matches should return a node when the node has the right prefix");
1156 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_EXACT),
null,
1157 "exact matches should return null if nodes don't have url attributes");
1158 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_PREFIX),
node,
1159 "prefix matches for urls with the right prefix should return a node");
1160 assertEqual(SPS.getNodeForURL(
"other/other", SPS.URL_MATCH_PREFIX),
null,
1161 "prefix matches for urls with the wrong prefix should return null");
1164 node.url = prefix +
"node";
1165 node.contentPrefix =
null;
1166 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_EXACT),
node,
1167 "exact matches for the right url should return a node");
1173 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_PREFIX),
node,
1174 "prefix matches should succeed if the url match is exact");
1175 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_EXACT),
null,
1176 "exact matches should return null when no node has the right url");
1177 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_PREFIX),
null,
1178 "prefix matches should return null when no node has the right url or prefix");
1179 assertEqual(SPS.getNodeForURL(
"other/other", SPS.URL_MATCH_PREFIX),
null,
1180 "prefix matches should return null when no node has the right url or prefix");
1183 SPS.removeNode(node);
1184 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_EXACT),
null,
1185 "exact matches should return null when there are no nodes");
1186 assertEqual(SPS.getNodeForURL(
"prefix/node", SPS.URL_MATCH_PREFIX),
null,
1187 "prefix matches should return null when there are no nodes");
1188 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_EXACT),
null,
1189 "exact matches should return null when there are no nodes");
1190 assertEqual(SPS.getNodeForURL(
"prefix/other", SPS.URL_MATCH_PREFIX),
null,
1191 "prefix matches should return null when there are no nodes");
1192 assertEqual(SPS.getNodeForURL(
"other/other", SPS.URL_MATCH_PREFIX),
null,
1193 "prefix matches should return null when there are no nodes");
1200 let SPS =
Cc[
"@songbirdnest.com/servicepane/service;1"]
1201 .getService(
Ci.sbIServicePaneService);
1208 "Service pane service root is not a service pane node");
1211 let testRoot = SPS.createNode();
1213 "created node is not a service pane node");
1218 "service pane node should not have a parent");
1222 SPS.root.appendChild(testRoot);
1225 "service pane node's parent should be the service pane service root");
1229 SPS.root.removeChild(testRoot);
1232 "service pane node should have no parent after being removed");
1236 SPS.root.appendChild(testRoot);
1239 "service pane node's parent should be the service pane service root");
1258 SPS.root.removeChild(testRoot);
function assertNotEqual(aExpected, aActual, aMessage)
imageContainer appendChild(newImage)
function testAttributes(aNode)
function testListeners(SPS, aRoot)
sbOSDControlService prototype QueryInterface
function assertTrue(aTest, aMessage)
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
function assertEqual(aExpected, aActual, aMessage)
function testTreeManipulation(SPS, aRoot)
sbDeviceServicePane prototype servicePaneInit
function assertArraysEqual(a1, a2)
function testAddRemoveNode(SPS, aRoot)
function testContentPrefix(SPS, aRoot)
function testNodeByAttribute(SPS, aRoot)
menuItem setAttribute("handlerType","client")
return!aWindow arguments!aWindow arguments[0]
function assertFalse(aTest, aMessage)
function testModuleInteraction(SPS, aRoot)
function serializeTree(aNode)
Common service pane helper functions.
function runTest()
Advanced DataRemote unit tests.
sbDeviceServicePane prototype nodeInserted
sbDeviceServicePane prototype nodeRemoved