36 var
gSS =
Cc[
"@mozilla.org/browser/search-service;1"].
38 var
gObs =
Cc[
"@mozilla.org/observer-service;1"].
47 case "engine-current":
50 case "engine-removed":
59 gObs.addObserver(
observers,
"browser-search-engine-modified",
false);
61 gSS.addEngine(
"http://localhost:8888/browser/browser/components/search/test/testEngine.xml",
62 Ci.nsISearchEngine.DATA_XML,
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
67 var engine =
gSS.getEngineByName(
"Foo");
68 ok(engine,
"Engine was added.");
70 var aEngine =
gSS.getEngineByAlias(
"fooalias");
71 ok(!aEngine,
"Alias was not parsed from engine description");
73 gSS.currentEngine = engine;
77 var engine =
gSS.currentEngine;
78 is(engine.name,
"Foo",
"Current engine was changed successfully");
80 gSS.removeEngine(engine);
84 var engine =
gSS.currentEngine;
85 ok(engine,
"An engine is present.");
86 isnot(engine.name,
"Foo",
"Current engine reset after removal");
88 gObs.removeObserver(
observers,
"browser-search-engine-modified");
getService(Ci.sbIFaceplateManager)
_updateTextAndScrollDataForFrame aData
sbDeviceFirmwareAutoCheckForUpdate prototype observe