Permalink
Browse files

Gecko 21 compatibility tests (bugs 866940, 866932, 866929)

  • Loading branch information...
1 parent ac5111f commit b8ac8a999d48dbfda62af01dd383a82642b17b6e @mattbasta committed May 7, 2013
Showing with 101 additions and 15 deletions.
  1. +41 −0 tests/compat/test_gecko21.py
  2. +21 −10 validator/app_versions.json
  3. +39 −5 validator/testcases/regex.py
View
41 tests/compat/test_gecko21.py
@@ -0,0 +1,41 @@
+from helper import CompatTestCase
+from validator.compat import FX21_DEFINITION
+
+
+class TestFX21Compat(CompatTestCase):
+ """Test that compatibility tests for Gecko 21 are properly executed."""
+
+ VERSION = FX21_DEFINITION
+
+ def test_jsm(self):
+ def test_pattern(self, pat):
+ self.setUp()
+ self.run_regex_for_compat(pat, is_js=True)
+ self.assert_silent()
+ self.assert_compat_error(type_="warning")
+
+ yield test_pattern, self, "resource:///modules/foo/bar"
+ yield test_pattern, self, "resource://gre/modules/HUDService.jsm"
+ yield test_pattern, self, "resource://gre/modules/offlineAppCache.jsm"
+
+ def test_jsm_pass(self):
+ def test_pattern(self, pat):
+ self.setUp()
+ self.run_regex_for_compat(pat, is_js=True)
+ self.assert_silent()
+ self.assert_compat_silent()
+
+ yield test_pattern, self, "resource:///foo/bar"
+ yield test_pattern, self, "resource://gre/modules/HUDService"
+ yield test_pattern, self, "resource://foo/modules/offlineAppCache.jsm"
+
+ def test_nsINavHistoryService(self):
+ self.run_regex_for_compat(
+ "RESULT_TYPE_DYNAMIC_CONTAINER", is_js=True)
+ self.assert_silent()
+ self.assert_compat_error(type_="warning")
+
+ def test_onBeforeStuff(self):
+ self.run_regex_for_compat("onBeforeDeleteURI", is_js=True)
+ self.assert_silent()
+ self.assert_compat_error(type_="warning")
View
31 validator/app_versions.json
@@ -41,7 +41,9 @@
"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"]
+ "22.0a1", "22.0a2", "22.0", "22.*",
+ "23.0a1", "23.0a2", "23.0", "23.*",
+ "24.0a1", "24.0a2", "24.0", "24.*"]
},
"2":{"name":"Mozilla",
"guid":"{86c18b42-e466-45a9-ae7a-9b95ba6f5640}",
@@ -81,7 +83,9 @@
"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"]
+ "22.0a1", "22.0a2", "22.0", "22.*",
+ "23.0a1", "23.0a2", "23.0", "23.*",
+ "24.0a1", "24.0a2", "24.0", "24.*"]
},
"4":{"name":"Sunbird",
"guid":"{718e30fb-e89b-41dd-9da7-e25a45638b28}",
@@ -131,13 +135,20 @@
"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", "21.0a2",
- "21.0", "21.*", "22.0a1", "22.0a2", "22.0"]
+ ["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", "22.*",
+ "23.0a1", "23.0a2", "23.0", "23.*",
+ "24.0a1", "24.0a2", "24.0", "24.*"]
}
}
View
44 validator/testcases/regex.py
@@ -7,11 +7,11 @@
FX11_DEFINITION, FX12_DEFINITION, FX13_DEFINITION,
FX14_DEFINITION, FX15_DEFINITION, FX16_DEFINITION,
FX17_DEFINITION, FX18_DEFINITION, FX19_DEFINITION,
- FX20_DEFINITION, TB7_DEFINITION, TB10_DEFINITION,
- TB11_DEFINITION, TB12_DEFINITION, TB13_DEFINITION,
- TB14_DEFINITION, TB15_DEFINITION, TB16_DEFINITION,
- TB17_DEFINITION, TB18_DEFINITION, TB19_DEFINITION,
- TB20_DEFINITION)
+ FX20_DEFINITION, FX21_DEFINITION,
+ TB7_DEFINITION, TB10_DEFINITION, TB11_DEFINITION,
+ TB12_DEFINITION, TB13_DEFINITION, TB14_DEFINITION,
+ TB15_DEFINITION, TB16_DEFINITION, TB17_DEFINITION,
+ TB18_DEFINITION, TB19_DEFINITION, TB20_DEFINITION)
from validator.contextgenerator import ContextGenerator
from markup.csstester import UNPREFIXED_MESSAGE
@@ -908,6 +908,40 @@ def js_tests(self):
@register_generator
+class Gecko21RegexTests(CompatRegexTestHelper):
+ """Regex tests for Gecko 21 updates."""
+
+ VERSION = FX21_DEFINITION
+
+ def js_tests(self):
+
+ for pattern in (
+ "resource:///modules/.*",
+ r"resource://gre/modules/(HUDService|MigrationUtils|"
+ "PlacesUIUtils|PropertyPanel|RecentWindow|offlineAppCache|"
+ "source-editor)\.jsm"):
+ yield self.get_test_bug(
+ 763295, pattern,
+ "Some JS Modules were moved to a different location.",
+ "Some JS modules were moved from `resource:///` and "
+ "`resource://gre/` to `resource://app/`.",
+ compat_type="error", log_function=self.err.warning)
+
+ yield self.get_test_bug(
+ 835543, "(RESULT_TYPE_DYNAMIC_CONTAINER|RESULT_TYPE_FULL_VISIT)",
+ "`nsINavHistoryService` members removed.",
+ "`RESULT_TYPE_DYNAMIC_CONTAINER` and `RESULT_TYPE_FULL_VISIT` "
+ "were removed.",
+ compat_type="error", log_function=self.err.warning)
+
+ yield self.get_test_bug(
+ 826409, "(onBeforeDeleteURI|onBeforeItemRemoved)",
+ "Event handlers removed in Gecko 21",
+ "`onBeforeDeleteURI` and `onBeforeItemRemoved` were removed.",
+ compat_type="error", log_function=self.err.warning)
+
+
+@register_generator
class Thunderbird7RegexTests(CompatRegexTestHelper):
"""Regex tests for the Thunderbird 7 update."""

0 comments on commit b8ac8a9

Please sign in to comment.