5 var
handler =
Cc[
"@mozilla.org/uriloader/web-handler-app;1"].
7 handler.name =
"App pane alive test";
8 handler.uriTemplate =
"http://test.mozilla.org/%s";
10 var extps =
Cc[
"@mozilla.org/uriloader/external-protocol-service;1"].
12 var info = extps.getProtocolHandlerInfo(
"apppanetest");
13 info.possibleApplicationHandlers.appendElement(handler,
false);
15 var hserv =
Cc[
"@mozilla.org/uriloader/handler-service;1"].
19 var obs =
Cc[
"@mozilla.org/observer-service;1"].
24 if (topic !=
"app-handler-pane-loaded")
27 obs.removeObserver(observer,
"app-handler-pane-loaded");
31 obs.addObserver(observer,
"app-handler-pane-loaded",
false);
33 openDialog(
"chrome://browser/content/preferences/preferences.xul",
"Preferences",
34 "chrome,titlebar,toolbar,centerscreen,dialog=no",
"paneApplications");
38 var sel =
win.document.documentElement.getAttribute(
"lastSelected");
39 ok(sel ==
"paneApplications",
"Specified pane was opened");
41 var rbox =
win.document.getElementById(
"handlersView");
42 ok(rbox,
"handlersView is present");
44 var items = rbox && rbox.getElementsByTagName(
"richlistitem");
45 ok(items && items.length > 0,
"App handler list populated");
47 var handlerAdded =
false;
48 for (let
i = 0;
i < items.length;
i++) {
49 if (items[
i].type ==
"apppanetest")
52 ok(handlerAdded,
"apppanetest protocol handler was successfully added");
getService(Ci.sbIFaceplateManager)
_getSelectedPageStyle s i
sbDeviceFirmwareAutoCheckForUpdate prototype observe