Skip to content
This repository
Browse code

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

  • Loading branch information...
commit b8ac8a999d48dbfda62af01dd383a82642b17b6e 1 parent ac5111f
Matt Basta authored May 07, 2013
41  tests/compat/test_gecko21.py
... ...
@@ -0,0 +1,41 @@
  1
+from helper import CompatTestCase
  2
+from validator.compat import FX21_DEFINITION
  3
+
  4
+
  5
+class TestFX21Compat(CompatTestCase):
  6
+    """Test that compatibility tests for Gecko 21 are properly executed."""
  7
+
  8
+    VERSION = FX21_DEFINITION
  9
+
  10
+    def test_jsm(self):
  11
+        def test_pattern(self, pat):
  12
+            self.setUp()
  13
+            self.run_regex_for_compat(pat, is_js=True)
  14
+            self.assert_silent()
  15
+            self.assert_compat_error(type_="warning")
  16
+
  17
+        yield test_pattern, self, "resource:///modules/foo/bar"
  18
+        yield test_pattern, self, "resource://gre/modules/HUDService.jsm"
  19
+        yield test_pattern, self, "resource://gre/modules/offlineAppCache.jsm"
  20
+
  21
+    def test_jsm_pass(self):
  22
+        def test_pattern(self, pat):
  23
+            self.setUp()
  24
+            self.run_regex_for_compat(pat, is_js=True)
  25
+            self.assert_silent()
  26
+            self.assert_compat_silent()
  27
+
  28
+        yield test_pattern, self, "resource:///foo/bar"
  29
+        yield test_pattern, self, "resource://gre/modules/HUDService"
  30
+        yield test_pattern, self, "resource://foo/modules/offlineAppCache.jsm"
  31
+
  32
+    def test_nsINavHistoryService(self):
  33
+        self.run_regex_for_compat(
  34
+            "RESULT_TYPE_DYNAMIC_CONTAINER", is_js=True)
  35
+        self.assert_silent()
  36
+        self.assert_compat_error(type_="warning")
  37
+
  38
+    def test_onBeforeStuff(self):
  39
+        self.run_regex_for_compat("onBeforeDeleteURI", is_js=True)
  40
+        self.assert_silent()
  41
+        self.assert_compat_error(type_="warning")
31  validator/app_versions.json
@@ -41,7 +41,9 @@
41 41
          "19.0a1", "19.0a2", "19.0", "19.*",
42 42
          "20.0a1", "20.0a2", "20.0", "20.*",
43 43
          "21.0a1", "21.0a2", "21.0", "21.*",
44  
-         "22.0a1", "22.0a2", "22.0"]
  44
+         "22.0a1", "22.0a2", "22.0", "22.*",
  45
+         "23.0a1", "23.0a2", "23.0", "23.*",
  46
+         "24.0a1", "24.0a2", "24.0", "24.*"]
45 47
     },
46 48
     "2":{"name":"Mozilla",
47 49
          "guid":"{86c18b42-e466-45a9-ae7a-9b95ba6f5640}",
@@ -81,7 +83,9 @@
81 83
          "19.0a1", "19.0a2", "19.0", "19.*",
82 84
          "20.0a1", "20.0a2", "20.0", "20.*",
83 85
          "21.0a1", "21.0a2", "21.0", "21.*",
84  
-         "22.0a1", "22.0a2", "22.0"]
  86
+         "22.0a1", "22.0a2", "22.0", "22.*",
  87
+         "23.0a1", "23.0a2", "23.0", "23.*",
  88
+         "24.0a1", "24.0a2", "24.0", "24.*"]
85 89
     },
86 90
     "4":{"name":"Sunbird",
87 91
          "guid":"{718e30fb-e89b-41dd-9da7-e25a45638b28}",
@@ -131,13 +135,20 @@
131 135
     "7":{"name":"Android",
132 136
          "guid":"{aa3c5121-dab2-40e2-81ca-7ea25febc110}",
133 137
          "versions":
134  
-        ["10.0a1", "10.0a2", "10.0", "10.*", "11.0a1",  "11.0a2", "11.0",
135  
-         "11.*", "12.0a1", "12.0a2", "12.0", "12.*", "13.0a1", "13.0a2",
136  
-         "13.0", "13.*", "14.0a1", "14.0a2", "14.0", "14.*", "15.0a1",
137  
-         "15.0a2", "15.0", "15.*", "16.0a1", "16.0a2", "16.0", "16.*",
138  
-         "17.0a1", "17.0a2", "17.0", "17.0a1", "17.0a2", "17.0", "17.*",
139  
-         "18.0a1", "18.0a2", "18.0", "18.*", "19.0a1", "19.0a2", "19.0",
140  
-         "19.*", "20.0a1", "20.0a2", "20.0", "20.*", "21.0a1", "21.0a2",
141  
-         "21.0", "21.*", "22.0a1", "22.0a2", "22.0"]
  138
+        ["10.0a1", "10.0a2", "10.0", "10.*",
  139
+         "11.0a1", "11.0a2", "11.0", "11.*",
  140
+         "12.0a1", "12.0a2", "12.0", "12.*",
  141
+         "13.0a1", "13.0a2", "13.0", "13.*",
  142
+         "14.0a1", "14.0a2", "14.0", "14.*",
  143
+         "15.0a1", "15.0a2", "15.0", "15.*",
  144
+         "16.0a1", "16.0a2", "16.0", "16.*",
  145
+         "17.0a1", "17.0a2", "17.0", "17.*",
  146
+         "18.0a1", "18.0a2", "18.0", "18.*",
  147
+         "19.0a1", "19.0a2", "19.0", "19.*",
  148
+         "20.0a1", "20.0a2", "20.0", "20.*",
  149
+         "21.0a1", "21.0a2", "21.0", "21.*",
  150
+         "22.0a1", "22.0a2", "22.0", "22.*",
  151
+         "23.0a1", "23.0a2", "23.0", "23.*",
  152
+         "24.0a1", "24.0a2", "24.0", "24.*"]
142 153
     }
143 154
 }
44  validator/testcases/regex.py
@@ -7,11 +7,11 @@
7 7
                               FX11_DEFINITION, FX12_DEFINITION, FX13_DEFINITION,
8 8
                               FX14_DEFINITION, FX15_DEFINITION, FX16_DEFINITION,
9 9
                               FX17_DEFINITION, FX18_DEFINITION, FX19_DEFINITION,
10  
-                              FX20_DEFINITION, TB7_DEFINITION, TB10_DEFINITION,
11  
-                              TB11_DEFINITION, TB12_DEFINITION, TB13_DEFINITION,
12  
-                              TB14_DEFINITION, TB15_DEFINITION, TB16_DEFINITION,
13  
-                              TB17_DEFINITION, TB18_DEFINITION, TB19_DEFINITION,
14  
-                              TB20_DEFINITION)
  10
+                              FX20_DEFINITION, FX21_DEFINITION,
  11
+                              TB7_DEFINITION, TB10_DEFINITION, TB11_DEFINITION,
  12
+                              TB12_DEFINITION, TB13_DEFINITION, TB14_DEFINITION,
  13
+                              TB15_DEFINITION, TB16_DEFINITION, TB17_DEFINITION,
  14
+                              TB18_DEFINITION, TB19_DEFINITION, TB20_DEFINITION)
15 15
 from validator.contextgenerator import ContextGenerator
16 16
 from markup.csstester import UNPREFIXED_MESSAGE
17 17
 
@@ -908,6 +908,40 @@ def js_tests(self):
908 908
 
909 909
 
910 910
 @register_generator
  911
+class Gecko21RegexTests(CompatRegexTestHelper):
  912
+    """Regex tests for Gecko 21 updates."""
  913
+
  914
+    VERSION = FX21_DEFINITION
  915
+
  916
+    def js_tests(self):
  917
+
  918
+        for pattern in (
  919
+                "resource:///modules/.*",
  920
+                r"resource://gre/modules/(HUDService|MigrationUtils|"
  921
+                    "PlacesUIUtils|PropertyPanel|RecentWindow|offlineAppCache|"
  922
+                    "source-editor)\.jsm"):
  923
+            yield self.get_test_bug(
  924
+                763295, pattern,
  925
+                "Some JS Modules were moved to a different location.",
  926
+                "Some JS modules were moved from `resource:///` and "
  927
+                "`resource://gre/` to `resource://app/`.",
  928
+                compat_type="error", log_function=self.err.warning)
  929
+
  930
+        yield self.get_test_bug(
  931
+            835543, "(RESULT_TYPE_DYNAMIC_CONTAINER|RESULT_TYPE_FULL_VISIT)",
  932
+            "`nsINavHistoryService` members removed.",
  933
+            "`RESULT_TYPE_DYNAMIC_CONTAINER` and `RESULT_TYPE_FULL_VISIT` "
  934
+            "were removed.",
  935
+            compat_type="error", log_function=self.err.warning)
  936
+
  937
+        yield self.get_test_bug(
  938
+            826409, "(onBeforeDeleteURI|onBeforeItemRemoved)",
  939
+            "Event handlers removed in Gecko 21",
  940
+            "`onBeforeDeleteURI` and `onBeforeItemRemoved` were removed.",
  941
+            compat_type="error", log_function=self.err.warning)
  942
+
  943
+
  944
+@register_generator
911 945
 class Thunderbird7RegexTests(CompatRegexTestHelper):
912 946
     """Regex tests for the Thunderbird 7 update."""
913 947
 

0 notes on commit b8ac8a9

Please sign in to comment.
Something went wrong with that request. Please try again.