зеркало из https://github.com/mozilla/pjs.git
Bug 573679 - Fix tests to pass on trunk
Get a profile for xpcshell tests so that login manager works (and probably other stuff). Fix up anno test from this change to use a real bookmark id.
This commit is contained in:
Родитель
4fe565e763
Коммит
57cf89779b
|
@ -7,8 +7,10 @@ if (this.do_load_httpd_js == null) {
|
|||
Cu = Components.utils;
|
||||
Cu.import("resource://harness/modules/httpd.js");
|
||||
}
|
||||
else
|
||||
else {
|
||||
do_load_httpd_js();
|
||||
do_get_profile();
|
||||
}
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@ _("Make sure various combinations of anno arguments do the right get/set for pag
|
|||
Cu.import("resource://services-sync/util.js");
|
||||
|
||||
function run_test() {
|
||||
_("set an anno on an item 1");
|
||||
Utils.anno(1, "anno", "hi");
|
||||
do_check_eq(Utils.anno(1, "anno"), "hi");
|
||||
|
||||
_("create a bookmark to a url so it exists");
|
||||
let url = "about:";
|
||||
let bmkid = Svc.Bookmark.insertBookmark(Svc.Bookmark.unfiledBookmarksFolder,
|
||||
Utils.makeURI(url), -1, "");
|
||||
|
||||
_("set an anno on the bookmark ");
|
||||
Utils.anno(bmkid, "anno", "hi");
|
||||
do_check_eq(Utils.anno(bmkid, "anno"), "hi");
|
||||
|
||||
_("set an anno on a url");
|
||||
Utils.anno(url, "tation", "hello");
|
||||
do_check_eq(Utils.anno(url, "tation"), "hello");
|
||||
|
@ -24,7 +24,7 @@ function run_test() {
|
|||
do_check_eq(Utils.anno(url, "tation"), "bye!");
|
||||
|
||||
_("sanity check that the item anno is still there");
|
||||
do_check_eq(Utils.anno(1, "anno"), "hi");
|
||||
do_check_eq(Utils.anno(bmkid, "anno"), "hi");
|
||||
|
||||
_("invalid uris don't get annos");
|
||||
let didThrow = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче