Browse files

FX19 compat updates (bugs 837928, 837930)

  • Loading branch information...
1 parent 0aba641 commit 89aea7de2704a322536df41a820a26da75340f2a @mattbasta mattbasta committed Feb 8, 2013
View
6 tests/compat/helper.py
@@ -43,12 +43,13 @@ def run_xpcom_for_compat(self, interface, methods=None):
self.run_script_for_compat(script % method)
yield
- def run_regex_for_compat(self, input):
+ def run_regex_for_compat(self, input, is_js=False):
"""Test an input with and without version restrictions to determine
whether it properly raises regex compatibility messages.
"""
- self._run_member_for_compat(lambda: self.run_regex(input))
+ self._run_member_for_compat(
+ lambda: self.run_regex(input, is_js=is_js))
def _run_member_for_compat(self, method):
# Run the method without version restrictions.
@@ -95,4 +96,3 @@ def _assert_compat_type(self, compat_type, type_):
m in message_collection), \
("No %ss that raise a compatibility %s were found." %
(type_, compat_type))
-
View
19 tests/compat/test_gecko19.py
@@ -0,0 +1,19 @@
+from helper import CompatTestCase
+from validator.compat import FX19_DEFINITION
+
+
+class TestFX19Compat(CompatTestCase):
+ """Test that compatibility tests for Gecko 19 are properly executed."""
+
+ VERSION = FX19_DEFINITION
+
+ def test_nsIConsoleService_GetMessageArray(self):
+ for method in self.run_xpcom_for_compat(
+ "nsIConsoleService", ["getMessageArray()"]):
+ self.assert_silent()
+ self.assert_compat_error(type_="notice")
+
+ def test_nsIContentPrefService(self):
+ self.run_regex_for_compat("nsIContentPrefService", is_js=True)
+ self.assert_silent()
+ self.assert_compat_error(type_="notice")
View
10 tests/helper.py
@@ -146,12 +146,16 @@ class RegexTestCase(TestCase):
regex test scenarios.
"""
- def run_regex(self, input):
+ def run_regex(self, input, is_js=False):
"""Run the standard regex tests for non-JavaScript input."""
if self.err is None:
self.setup_err()
- input = '<input onclick="%s" />' % input
- regex.run_regex_tests(input, self.err, "foo.txt", is_js=False)
+
+ if not is_js:
+ input = '<input onclick="%s" />' % input
+ else:
+ input = "'use strict';\n%s" % input
+ regex.run_regex_tests(input, self.err, "foo.txt", is_js=is_js)
def run_js_regex(self, input):
"""Run the standard regex tests for JavaScript input."""
View
148 validator/app_versions.json
@@ -4,31 +4,44 @@
"versions":
["0.3", "0.6", "0.7", "0.7+", "0.8", "0.8+", "0.9.x", "0.9", "0.9.0+",
"0.9.1+", "0.9.2+", "0.9.3", "0.9.3+", "0.9+", "0.10", "0.10.1",
- "0.10+", "1.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.0.6",
- "1.0.7", "1.0.8", "1.0+", "1.4", "1.4.0", "1.4.1", "1.5b1", "1.5b2",
- "1.5", "1.5.0.4", "1.5.0.*", "2.0a1", "2.0a2", "2.0a3", "2.0b1",
- "2.0b2", "2.0", "2.0.0.4", "2.0.0.8", "2.0.0.*", "3.0a1", "3.0a2",
- "3.0a3", "3.0a4", "3.0a5", "3.0a6", "3.0a7", "3.0a8pre", "3.0a8",
- "3.0a9", "3.0b1", "3.0b2pre", "3.0b2", "3.0b3pre", "3.0b3",
- "3.0b4pre", "3.0b4", "3.0b5pre", "3.0b5", "3.0pre", "3.0", "3.0.9",
- "3.0.11", "3.0.12", "3.0.*", "3.1a1pre", "3.1a1", "3.1a2pre", "3.1a2",
- "3.1b1pre", "3.1b1", "3.1b2pre", "3.1b2", "3.1b3pre", "3.1b3",
- "3.5b4pre", "3.5b4", "3.5b5pre", "3.5", "3.5.*", "3.6a1pre", "3.6a1",
- "3.6a2pre", "3.6b1pre", "3.6b2", "3.6", "3.6.4", "3.6.*", "3.7a1pre",
- "3.7a1", "3.7a2pre", "3.7a2", "3.7a3pre", "3.7a3", "3.7a4pre",
- "3.7a4", "3.7a5pre", "3.7a5", "3.7a6pre", "4.0b1", "4.0b2pre",
- "4.0b2", "4.0b3pre", "4.0b3", "4.0b4pre", "4.0b4", "4.0b5pre",
- "4.0b5", "4.0b6pre", "4.0b6", "4.0b7pre", "4.0b7", "4.0b8pre",
- "4.0b8", "4.0b9pre", "4.0b9", "4.0b10pre", "4.0b10", "4.0b11pre",
- "4.0b11", "4.0b12pre", "4.0b12", "4.0", "4.0.*", "4.2a1pre", "5.0a2",
- "5.0", "5.*", "6.0a1", "6.0a2", "6.0", "6.*", "7.0a1", "7.0a2", "7.0",
- "7.*", "8.0a1", "8.0a2", "8.0", "8.*", "9.0a1", "9.0a2", "9.0",
- "9.*", "10.0a1", "10.0a2", "10.0", "10.*", "11.0a1", "11.0a2", "11.0",
- "11.*", "12.0a1", "12.0a2", "12.0", "12.*", "13.0a1", "13.0a2", "13.0",
- "13.*", "14.0a1", "14.0a2", "14.0", "14.*", "15.0a1", "15.0a2", "15.0",
- "15.*", "16.0a1", "16.0a2", "16.0", "16.*", "17.0a1", "17.0a2", "17.0",
- "17.0a1", "17.0a2", "17.0", "17.*", "18.0a1", "18.0a2", "18.0", "18.*",
- "19.0a1", "19.0a2", "19.0", "19.*", "20.0a1", "20.0a2", "20.0", "20.*"]
+ "0.10+",
+ "1.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.0.6", "1.0.7",
+ "1.0.8", "1.0+", "1.4", "1.4.0", "1.4.1", "1.5b1", "1.5b2", "1.5",
+ "1.5.0.4", "1.5.0.*",
+ "2.0a1", "2.0a2", "2.0a3", "2.0b1", "2.0b2", "2.0", "2.0.0.4",
+ "2.0.0.8", "2.0.0.*",
+ "3.0a1", "3.0a2", "3.0a3", "3.0a4", "3.0a5", "3.0a6", "3.0a7",
+ "3.0a8pre", "3.0a8", "3.0a9", "3.0b1", "3.0b2pre", "3.0b2",
+ "3.0b3pre", "3.0b3", "3.0b4pre", "3.0b4", "3.0b5pre", "3.0b5",
+ "3.0pre", "3.0", "3.0.9", "3.0.11", "3.0.12", "3.0.*", "3.1a1pre",
+ "3.1a1", "3.1a2pre", "3.1a2", "3.1b1pre", "3.1b1", "3.1b2pre",
+ "3.1b2", "3.1b3pre", "3.1b3", "3.5b4pre", "3.5b4", "3.5b5pre", "3.5",
+ "3.5.*", "3.6a1pre", "3.6a1", "3.6a2pre", "3.6b1pre", "3.6b2", "3.6",
+ "3.6.4", "3.6.*",
+ "3.7a1pre", "3.7a1", "3.7a2pre", "3.7a2", "3.7a3pre", "3.7a3",
+ "3.7a4pre", "3.7a4", "3.7a5pre", "3.7a5", "3.7a6pre", "4.0b1",
+ "4.0b2pre", "4.0b2", "4.0b3pre", "4.0b3", "4.0b4pre", "4.0b4",
+ "4.0b5pre", "4.0b5", "4.0b6pre", "4.0b6", "4.0b7pre", "4.0b7",
+ "4.0b8pre", "4.0b8", "4.0b9pre", "4.0b9", "4.0b10pre", "4.0b10",
+ "4.0b11pre", "4.0b11", "4.0b12pre", "4.0b12", "4.0", "4.0.*",
+ "4.2a1pre", "5.0a2", "5.0", "5.*",
+ "6.0a1", "6.0a2", "6.0", "6.*",
+ "7.0a1", "7.0a2", "7.0", "7.*",
+ "8.0a1", "8.0a2", "8.0", "8.*",
+ "9.0a1", "9.0a2", "9.0", "9.*",
+ "10.0a1", "10.0a2", "10.0", "10.*",
+ "11.0a1", "11.0a2", "11.0", "11.*",
+ "12.0a1", "12.0a2", "12.0", "12.*",
+ "13.0a1", "13.0a2", "13.0", "13.*",
+ "14.0a1", "14.0a2", "14.0", "14.*",
+ "15.0a1", "15.0a2", "15.0", "15.*",
+ "16.0a1", "16.0a2", "16.0", "16.*",
+ "17.0a1", "17.0a2", "17.0", "17.*",
+ "18.0a1", "18.0a2", "18.0", "18.*",
+ "19.0a1", "19.0a2", "19.0", "19.*",
+ "20.0a1", "20.0a2", "20.0", "20.*",
+ "21.0a1", "21.0a2", "21.0", "21.*",
+ "22.0a1", "22.0a2", "22.0"]
},
"2":{"name":"Mozilla",
"guid":"{86c18b42-e466-45a9-ae7a-9b95ba6f5640}",
@@ -41,23 +54,34 @@
"guid":"{3550f703-e582-4d05-9a08-453d09bdfdc6}",
"versions":
["0.3", "0.4", "0.5", "0.6", "0.7", "0.7.1", "0.7.1+", "0.7.2",
- "0.7.3", "0.7.3+", "0.7+", "0.8", "0.8+", "0.9", "0.9+", "1.0",
- "1.0.2", "1.0.6", "1.0.8", "1.1a1", "1.0+", "1.5b", "1.5b1", "1.5b2",
- "1.5", "1.5.0.4", "1.5.0.5", "1.5.0.*", "2.0a1", "2.0b1", "2.0b2",
- "2.0", "2.0.0.8", "2.0.0.*", "3.0a1pre", "3.0a1", "3.0a2pre", "3.0a2",
- "3.0a3", "3.0b1pre", "3.0b1", "3.0b2pre", "3.0b2", "3.0b3pre",
- "3.0b3", "3.0b4pre", "3.0b4", "3.0pre", "3.0", "3.0.1", "3.0.*",
- "3.1a1pre", "3.1a1", "3.1b1pre", "3.1b1", "3.1b2pre", "3.1b2",
- "3.1pre", "3.1", "3.1.*", "3.2a1pre", "3.3a1pre", "3.3a1", "3.3a2pre",
- "3.3a2", "3.3a3pre", "3.3a3", "3.3a4pre", "5.0b1", "5.0b2pre", "5.0",
- "5.*", "6.0a1", "6.0a2", "6.0", "6.*", "7.0a1", "7.0a2", "7.*",
- "8.0a1", "8.0a2", "8.0", "8.*", "9.0a1", "9.0a2", "9.0", "9.*",
- "10.0a1", "10.0a2", "10.0", "10.*", "11.0a1", "11.0a2", "11.0",
- "11.*", "12.0a1", "12.0a2", "12.0", "12.*", "13.0a1", "13.0a2", "13.0",
- "13.*", "14.0a1", "14.0a2", "14.0", "14.*", "15.0a1", "15.0a2", "15.0",
- "15.*", "16.0a1", "16.0a2", "16.0", "16.*", "17.0a1", "17.0a2", "17.0",
- "17.0a1", "17.0a2", "17.0", "17.*", "18.0a1", "18.0a2", "18.0", "18.*",
- "19.0a1", "19.0a2", "19.0", "19.*", "20.0a1", "20.0a2", "20.0", "20.*"]
+ "0.7.3", "0.7.3+", "0.7+", "0.8", "0.8+", "0.9", "0.9+",
+ "1.0", "1.0.2", "1.0.6", "1.0.8", "1.1a1", "1.0+", "1.5b", "1.5b1",
+ "1.5b2", "1.5", "1.5.0.4", "1.5.0.5", "1.5.0.*",
+ "2.0a1", "2.0b1", "2.0b2", "2.0", "2.0.0.8", "2.0.0.*",
+ "3.0a1pre", "3.0a1", "3.0a2pre", "3.0a2", "3.0a3", "3.0b1pre",
+ "3.0b1", "3.0b2pre", "3.0b2", "3.0b3pre", "3.0b3", "3.0b4pre",
+ "3.0b4", "3.0pre", "3.0", "3.0.1", "3.0.*", "3.1a1pre", "3.1a1",
+ "3.1b1pre", "3.1b1", "3.1b2pre", "3.1b2", "3.1pre", "3.1", "3.1.*",
+ "3.2a1pre", "3.3a1pre", "3.3a1", "3.3a2pre", "3.3a2", "3.3a3pre",
+ "3.3a3", "3.3a4pre",
+ "5.0b1", "5.0b2pre", "5.0", "5.*",
+ "6.0a1", "6.0a2", "6.0", "6.*",
+ "7.0a1", "7.0a2", "7.*",
+ "8.0a1", "8.0a2", "8.0", "8.*",
+ "9.0a1", "9.0a2", "9.0", "9.*",
+ "10.0a1", "10.0a2", "10.0", "10.*",
+ "11.0a1", "11.0a2", "11.0", "11.*",
+ "12.0a1", "12.0a2", "12.0", "12.*",
+ "13.0a1", "13.0a2", "13.0", "13.*",
+ "14.0a1", "14.0a2", "14.0", "14.*",
+ "15.0a1", "15.0a2", "15.0", "15.*",
+ "16.0a1", "16.0a2", "16.0", "16.*",
+ "17.0a1", "17.0a2", "17.0", "17.*",
+ "18.0a1", "18.0a2", "18.0", "18.*",
+ "19.0a1", "19.0a2", "19.0", "19.*",
+ "20.0a1", "20.0a2", "20.0", "20.*",
+ "21.0a1", "21.0a2", "21.0", "21.*",
+ "22.0a1", "22.0a2", "22.0"]
},
"4":{"name":"Sunbird",
"guid":"{718e30fb-e89b-41dd-9da7-e25a45638b28}",
@@ -70,18 +94,20 @@
"guid":"{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}",
"versions":
["1.0a", "1.0", "1.0.*", "1.1a", "1.1b", "1.1", "1.1.*", "1.5a",
- "2.0a", "2.0a1pre", "2.0a1", "2.0a2pre", "2.0a2", "2.0a3pre", "2.0a3",
- "2.0b1pre", "2.0b1", "2.0b2pre", "2.0b2", "2.0pre", "2.0", "2.0.1",
- "2.0.*", "2.1a1pre", "2.1a1", "2.1a2pre", "2.1a2", "2.1a3pre",
- "2.1a3", "2.1b1pre", "2.1b1", "2.1b2pre", "2.1b2", "2.1b3pre",
- "2.1b3", "2.1", "2.1.*", "2.2a1pre", "2.2", "2.2.*", "2.3a2", "2.3",
- "2.3.*", "2.4a1", "2.4a2", "2.5a1", "2.5a2", "2.6a1", "2.6a2", "2.6",
- "2.6.*", "2.7a1", "2.7a2", "2.7", "2.7.*", "2.8a1", "2.8a2", "2.8",
- "2.8.*", "2.9a1", "2.9a2", "2.9", "2.9.*", "2.10a1", "2.10a2", "2.10",
- "2.10.*", "2.11a1", "2.11a2", "2.11", "2.11.*", "2.12a1", "2.12a2",
- "2.12", "2.12.*", "2.13a1", "2.13a2", "2.13", "2.13.*", "2.14a1",
- "2.14a2", "2.14", "2.14.*", "2.15a1", "2.15a2", "2.15", "2.15.*",
- "2.16a1", "2.16a2", "2.16", "2.17a1", "2.17a2", "2.17", "2.18a1"]
+ "2.0a", "2.0a1pre", "2.0a1", "2.0a2pre", "2.0a2", "2.0a3pre",
+ "2.0a3", "2.0b1pre", "2.0b1", "2.0b2pre", "2.0b2", "2.0pre", "2.0",
+ "2.0.1", "2.0.*", "2.1a1pre", "2.1a1", "2.1a2pre", "2.1a2",
+ "2.1a3pre", "2.1a3", "2.1b1pre", "2.1b1", "2.1b2pre", "2.1b2",
+ "2.1b3pre", "2.1b3", "2.1", "2.1.*", "2.2a1pre", "2.2", "2.2.*",
+ "2.3a2", "2.3", "2.3.*", "2.4a1", "2.4a2", "2.5a1", "2.5a2", "2.6a1",
+ "2.6a2", "2.6", "2.6.*", "2.7a1", "2.7a2", "2.7", "2.7.*", "2.8a1",
+ "2.8a2", "2.8", "2.8.*", "2.9a1", "2.9a2", "2.9", "2.9.*", "2.10a1",
+ "2.10a2", "2.10", "2.10.*", "2.11a1", "2.11a2", "2.11", "2.11.*",
+ "2.12a1", "2.12a2", "2.12", "2.12.*", "2.13a1", "2.13a2", "2.13",
+ "2.13.*", "2.14a1", "2.14a2", "2.14", "2.14.*", "2.15a1", "2.15a2",
+ "2.15", "2.15.*", "2.16a1", "2.16a2", "2.16", "2.17a1", "2.17a2",
+ "2.17", "2.18a1", "2.18a2", "2.18", "2.18.*", "2.19a1", "2.19a2",
+ "2.19"]
},
"6":{"name":"Mobile",
"guid":"{a23983c0-fd0e-11dc-95ff-0800200c9a66}",
@@ -99,17 +125,19 @@
"15.0a2", "15.0", "15.*", "16.0a1", "16.0a2", "16.0", "16.*",
"17.0a1", "17.0a2", "17.0", "17.0a1", "17.0a2", "17.0", "17.*",
"18.0a1", "18.0a2", "18.0", "18.*", "19.0a1", "19.0a2", "19.0",
- "19.*", "20.0a1", "20.0a2", "20.0", "20.*", "21.0a1"]
+ "19.*", "20.0a1", "20.0a2", "20.0", "20.*", "21.0a1", "21.0a2",
+ "21.0", "21.*", "22.0a1", "22.0a2", "22.0"]
},
"7":{"name":"Android",
"guid":"{aa3c5121-dab2-40e2-81ca-7ea25febc110}",
"versions":
["10.0a1", "10.0a2", "10.0", "10.*", "11.0a1", "11.0a2", "11.0",
"11.*", "12.0a1", "12.0a2", "12.0", "12.*", "13.0a1", "13.0a2",
- "13.0", "13.*", "14.0a1", "14.0a2", "14.0", "14.*", "15.0a1", "15.0a2",
- "15.0", "15.*", "16.0a1", "16.0a2", "16.0", "16.*", "17.0a1", "17.0a2",
- "17.0", "17.0a1", "17.0a2", "17.0", "17.*", "18.0a1", "18.0a2", "18.0",
- "18.*", "19.0a1", "19.0a2", "19.0", "19.*", "20.0a1", "20.0a2", "20.0",
- "20.*", "21.0a1"]
+ "13.0", "13.*", "14.0a1", "14.0a2", "14.0", "14.*", "15.0a1",
+ "15.0a2", "15.0", "15.*", "16.0a1", "16.0a2", "16.0", "16.*",
+ "17.0a1", "17.0a2", "17.0", "17.0a1", "17.0a2", "17.0", "17.*",
+ "18.0a1", "18.0a2", "18.0", "18.*", "19.0a1", "19.0a2", "19.0",
+ "19.*", "20.0a1", "20.0a2", "20.0", "20.*", "21.0a1", "21.0a2",
+ "21.0", "21.*", "22.0a1", "22.0a2", "22.0"]
}
}
View
3 validator/compat.py
@@ -44,6 +44,9 @@ def _build_definition(maj_version_num, firefox=True, fennec=True,
FX17_DEFINITION = _build_definition(17, android=True)
FX18_DEFINITION = _build_definition(18, android=True)
FX19_DEFINITION = _build_definition(19, android=True)
+FX20_DEFINITION = _build_definition(20, android=True)
+FX21_DEFINITION = _build_definition(21, android=True)
+FX22_DEFINITION = _build_definition(22, android=True)
TB6_DEFINITION = {TB_GUID: version_range("thunderbird", "6.0a1", "7.0a1")}
TB7_DEFINITION = {TB_GUID: version_range("thunderbird", "7.0a1", "8.0a1")}
View
2 validator/errorbundler.py
@@ -95,6 +95,8 @@ def wrap(self, *args, **kwargs):
self._save_message(getattr(self, type_), type_, message,
context=kwargs.get("context"))
return self
+
+ wrap.__name__ = message_type
return wrap
# And then all the real functions. Ahh, how clean!
View
33 validator/testcases/javascript/entity_values.py
@@ -1,7 +1,9 @@
from call_definitions import open_in_chrome_context
from instanceproperties import _set_HTML_property
-from validator.compat import (FX10_DEFINITION, FX14_DEFINITION, FX16_DEFINITION,
- TB14_DEFINITION, TB15_DEFINITION, TB16_DEFINITION)
+from validator.compat import (FX10_DEFINITION, FX14_DEFINITION,
+ FX16_DEFINITION, FX19_DEFINITION,
+ TB14_DEFINITION, TB15_DEFINITION,
+ TB16_DEFINITION)
from validator.constants import BUGZILLA_BUG
@@ -10,9 +12,9 @@
def register_entity(name):
"""Allow an entity's modifier to be registered for use."""
- def wrap(function):
- ENTITIES[name] = function
- return function
+ def wrap(func):
+ ENTITIES[name] = func
+ return func
return wrap
@@ -45,6 +47,7 @@ def wrap(traverser):
tier=5)
register_entity(name)(wrap)
+
DEP_IHF_MESSAGE = ("The `importHTMLFromFile` and `importHTMLFromURI` functions "
"have been removed from the `nsIPlacesImportExportService` "
"interface. You can use the equivalent functions in the "
@@ -238,6 +241,26 @@ def on_open(wrapper, arguments, traverser):
return {"return": on_open}
+
+@register_entity("nsIConsoleService.getMessageArray")
+def nsIConsoleService_GetMessageArray(traverser):
+ traverser.err.notice(
+ err_id=("testcases_javascript_entity_values",
+ "nsIConsoleService.getMessageArray"),
+ notice="`getMessageArray` has changed",
+ description="The `getMessageArray` function has changed, and now it "
+ "returns the array instead of setting the object passed "
+ "as a parameter. See %s for more information." %
+ BUGZILLA_BUG % 664695,
+ filename=traverser.filename,
+ line=traverser.line,
+ column=traverser.position,
+ context=traverser.context,
+ for_appversions=FX19_DEFINITION,
+ compatibility_type="error",
+ tier=5)
+
+
# Thunderbird 14 IDL changes
@register_entity("nsIMsgPluggableStore.copyMessages")
def nsIMsgPluggableStore_copyMessages(traverser):
View
4 validator/testcases/javascript/predefinedentities.py
@@ -100,6 +100,10 @@
e.get_resource("em:bootstrap") and
"Authors of bootstrapped add-ons must take care to "
"clean up any component registrations at shutdown."}}},
+ u"nsIConsoleService":
+ {"value":
+ {u"getMessageArray":
+ entity("nsIConsoleService.getMessageArray")}},
u"nsIDOMNSHTMLElement": entity("nsIDOMNSHTMLElement"),
u"nsIDOMNSHTMLFrameElement": entity("nsIDOMNSHTMLFrameElement"),
u"nsIDNSService": {"value": {u"resolve": entity("nsIDNSService.resolve")}},
View
40 validator/testcases/regex.py
@@ -1,11 +1,12 @@
import re
+from functools import wraps
from validator.constants import BUGZILLA_BUG
from validator.compat import (FX4_DEFINITION, FX5_DEFINITION, FX6_DEFINITION,
FX7_DEFINITION, FX8_DEFINITION, FX9_DEFINITION,
FX11_DEFINITION, FX12_DEFINITION, FX13_DEFINITION,
FX14_DEFINITION, FX15_DEFINITION, FX16_DEFINITION,
- FX17_DEFINITION, FX18_DEFINITION,
+ FX17_DEFINITION, FX18_DEFINITION, FX19_DEFINITION,
TB7_DEFINITION, TB10_DEFINITION, TB11_DEFINITION,
TB12_DEFINITION, TB13_DEFINITION, TB14_DEFINITION,
TB15_DEFINITION, TB16_DEFINITION, TB17_DEFINITION)
@@ -89,19 +90,21 @@ def get_test(self, pattern, title, message, log_function=None,
"""
app_versions = app_versions or self.app_versions_fallback
log_function = log_function or self.err.warning
+ @wraps(log_function)
def wrapper():
matched = False
for match in re.finditer(pattern, self.document, flags):
+ print log_function.__name__
log_function(
- ("testcases_regex", "generic", "_generated"),
- title,
- message,
- filename=self.filename,
- line=self.context.get_line(match.start()),
- context=self.context,
- compatibility_type=compat_type,
- for_appversions=app_versions,
- tier=self.err.tier if app_versions is None else 5)
+ **{'err_id': ("testcases_regex", "generic", "_generated"),
+ log_function.__name__: title,
+ 'description': message,
+ 'filename': self.filename,
+ 'line': self.context.get_line(match.start()),
+ 'context': self.context,
+ 'compatibility_type': compat_type,
+ 'for_appversions': app_versions,
+ 'tier': self.err.tier if app_versions is None else 5})
matched = True
return matched
@@ -817,6 +820,23 @@ def js_tests(self):
@register_generator
+class Gecko19RegexTests(CompatRegexTestHelper):
+ """Regex tests for Gecko 19 updates."""
+
+ VERSION = FX19_DEFINITION
+
+ def js_tests(self):
+
+ yield self.get_test_bug(
+ 723002, "nsIContentPrefService",
+ "`nsIContentPrefService` has been changed.",
+ "`nsIContentPrefService` has been changed to support "
+ "per-window private browsing. Most of its functions now "
+ "require an additional argument to specify a context.",
+ compat_type="error", log_function=self.err.notice)
+
+
+@register_generator
class Thunderbird7RegexTests(CompatRegexTestHelper):
"""Regex tests for the Thunderbird 7 update."""

0 comments on commit 89aea7d

Please sign in to comment.