Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Flag XPCOMUtils.categoryManager.addCategoryEntry() (bug 694051)

  • Loading branch information...
commit 4762dd3d3dcc81e043c359fcd5fcf56b58b90235 1 parent a30a07b
@mattbasta mattbasta authored
View
2  tests/test_js_bootstrapped.py
@@ -32,6 +32,8 @@ def test_wrap(js):
for method in methods:
yield test_wrap, 'Cc[""].getService(Ci.%s).%s;' % method
+ yield test_wrap, "XPCOMUtils.categoryManager.addCategoryEntry();"
+
def test_bootstrapped_pass():
"""Test that bootstrap-agnostic tests pass while boostrapping."""
View
25 validator/testcases/javascript/predefinedentities.py
@@ -49,21 +49,23 @@
CONTENT_DOCUMENT = None
+CATEGORY_MANAGER = {
+ u"addCategoryEntry":
+ {"dangerous":
+ lambda a, t, e:
+ e.get_resource("em:bootstrap") and
+ ("Bootstrapped add-ons may not create persistent category "
+ "entries." if len(a) > 3 and t(a[3]).is_literal() else
+ "Authors of bootstrapped add-ons must take care to clean up "
+ "any added category entries at shutdown.")}}
+
+
INTERFACES = {
u"imIUserStatusInfo":
{"value":
{u"setUserIcon": entity("imIUserStatusInfo.setUserIcon")}},
u"nsICategoryManager":
- {"value":
- {u"addCategoryEntry":
- {"dangerous":
- lambda a, t, e:
- e.get_resource("em:bootstrap") and \
- ("Bootstrapped add-ons may not create persistent "
- "category entries."
- if len(a) > 3 and t(a[3]).is_literal() else
- "Authors of bootstrapped add-ons must take care to "
- "clean up any added category entries at shutdown.")}}},
+ {"value": CATEGORY_MANAGER},
u"nsIAbLDAPDirectory":
{"value":
{u"replicationFile": entity("nsIAbLDAPDirectory.replicationFile"),
@@ -658,6 +660,9 @@ def build_quick_xpcom(method, interface, traverser):
u"java": entity("java"),
u"Packages": entity("Packages"),
+
+ u"XPCOMUtils":
+ {"value": {u"categoryManager": {"value": CATEGORY_MANAGER}}},
}
CONTENT_DOCUMENT = GLOBAL_ENTITIES[u"content"]["value"][u"document"]
Please sign in to comment.
Something went wrong with that request. Please try again.