Permalink
Browse files

Compat test cleanup

  • Loading branch information...
1 parent 89aea7d commit 3d3dc9f096db1d5647ea2a1fcde1da6cedd85a2d @mattbasta mattbasta committed Feb 9, 2013
@@ -63,4 +63,3 @@ def test_nsIBrowserHistory(self):
"nsIBrowserHistory", ["lastPageVisited"]):
self.assert_silent()
self.assert_compat_error(type_="error")
-
@@ -24,4 +24,3 @@ def test_patterns(self):
self.run_regex_for_compat(pattern)
self.assert_silent()
self.assert_compat_error()
-
@@ -24,4 +24,3 @@ def test_interfaces(self):
self.run_regex_for_compat("Components.interfaces.%s" % interface)
self.assert_silent()
self.assert_compat_error()
-
@@ -52,4 +52,3 @@ def test_nsIAccessNode(self):
self.run_regex_for_compat("nsIAccessNode")
self.assert_silent()
self.assert_compat_error()
-
@@ -78,4 +78,3 @@ def test_nsILocalFile(self):
self.run_regex_for_compat("nsILocalFile")
self.assert_silent()
self.assert_compat_warning(type_="warning")
-
@@ -13,8 +13,7 @@ def test_navigator_language(self):
with Gecko 5.
"""
- self.run_script_for_compat('alert(navigator.language);')
+ self.run_regex_for_compat('alert(navigator.language);', is_js=True)
self.assert_silent()
self.assert_compat_error(type_="notice")
-
@@ -81,4 +81,3 @@ def test(versions):
<bar insertbefore="something else" />
</foo>
""")
-
@@ -37,4 +37,3 @@ def test_nsIJSON(self):
"nsIJSON", ["encode()", "decode()"]):
self.assert_silent()
self.assert_compat_warning()
-
@@ -26,4 +26,3 @@ def test_getSelection(self):
self.run_script_for_compat("document.getSelection();")
self.assert_silent()
self.assert_compat_error(type_="notice")
-
@@ -8,22 +8,23 @@ class TestGecko9Compat(CompatTestCase):
VERSION = FX9_DEFINITION
def test_taintEnabled(self):
- self.run_script_for_compat("alert(navigator.taintEnabled);")
+ self.run_regex_for_compat("alert(navigator.taintEnabled);", is_js=True)
self.assert_silent()
self.assert_compat_warning(type_="warning")
def test_documentURIObject(self):
- self.run_script_for_compat("alert(document.documentURIObject);")
+ self.run_regex_for_compat(
+ "alert(document.documentURIObject);", is_js=True)
self.assert_silent()
self.assert_compat_warning()
def test_nodePrincipal(self):
- self.run_script_for_compat("alert(document.nodePrincipal);")
+ self.run_regex_for_compat("alert(document.nodePrincipal);", is_js=True)
self.assert_silent()
self.assert_compat_warning()
def test_baseURIObject(self):
- self.run_script_for_compat("alert(document.baseURIObject);")
+ self.run_regex_for_compat("alert(document.baseURIObject);", is_js=True)
self.assert_silent()
self.assert_compat_warning()
@@ -152,4 +153,3 @@ def test_geo_prefs(self):
""")
self.assert_silent()
self.assert_compat_error()
-
@@ -19,4 +19,3 @@ def test_functions(self):
self.assert_silent()
assert self.compat_err.warnings or self.compat_err.notices
assert self.compat_err.compat_summary["errors"]
-
@@ -19,4 +19,3 @@ def test_interfaces(self):
"nsIMailtoUrl", ["GetMessageContents()"]):
self.assert_silent()
self.assert_compat_error(type_="notice")
-
@@ -19,4 +19,3 @@ def test_interfaces(self):
"nsIMsgDatabase", ["Open()"]):
self.assert_silent()
self.assert_compat_error(type_="notice")
-
@@ -25,14 +25,13 @@ def test_functions(self):
"serverPageUnload", "loginPageValidate", "setupBccTextbox",
"setupCcTextbox"]
for pattern in patterns:
- self.run_regex_for_compat("var x = %s();" % pattern)
+ self.run_regex_for_compat("var x = %s();" % pattern, is_js=True)
self.assert_silent()
assert self.compat_err.notices
assert self.compat_err.compat_summary["errors"]
# Extra tests for similar functions.
for pattern in ["serverPage", "clientPageInit"]:
- self.run_regex_for_compat("var x = %s();" % pattern)
+ self.run_regex_for_compat("var x = %s();" % pattern, is_js=True)
self.assert_silent()
self.assert_compat_silent()
-
@@ -26,10 +26,9 @@ def test_functions(self):
assert self.compat_err.compat_summary["errors"]
# These patterns should not be flagged.
- for pattern in ["cvsPrefs()", "mailnews()",
+ for pattern in ["cvsPrefs()", "mailnews()",
"CollapseSectionHeaderators()",
"msgMailSession", "msgPrefs",]:
- self.run_regex_for_compat("var x = %s();" % pattern)
+ self.run_regex_for_compat("var x = %s();" % pattern, is_js=True)
self.assert_silent()
self.assert_compat_silent()
-
@@ -19,7 +19,7 @@ def test_js_patterns(self):
"""Test that these js patterns are flagged in Thunderbird 15."""
def test_pattern(self, pattern):
self.setUp()
- self.run_regex_for_compat("var x = %s();" % pattern)
+ self.run_regex_for_compat("var x = %s();" % pattern, is_js=True)
self.assert_compat_error(type_="notice")
for r in ["testConfigurator", ".capabilityPref", "(getFeedUrlsInFolder",
@@ -30,10 +30,9 @@ def test_unflagged_patterns(self):
"""Test that these js patterns are _NOT_ flagged in Thunderbird 15."""
def test_pattern(self, pattern):
self.setUp()
- self.run_regex_for_compat("var x = %s();" % pattern)
+ self.run_regex_for_compat("var x = %s();" % pattern, is_js=True)
self.assert_compat_silent()
for r in ["getaddFeed", "sometimeswaitForBuddyInfo", "DC_RSS_NS",
"msgFeedSubscriptionsWindow", "msgetNodeValue"]:
yield test_pattern, self, r
-
View
@@ -18,4 +18,3 @@ def test_nsIImapProtocol(self):
"nsIImapProtocol", ["NotifyHdrsToDownload()"]):
self.assert_silent()
self.assert_compat_error(type_="notice")
-
View
@@ -47,4 +47,3 @@ def test_deRDF_addressbook(self):
""")
self.assert_silent()
self.assert_compat_error(type_="notice")
-
View
@@ -12,4 +12,3 @@ def test_nsIMsgSearchScopeTerm(self):
"nsIMsgSearchScopeTerm", ["mailFile()", "inputStream()"]):
self.assert_silent()
self.assert_compat_error(type_="notice")
-
View
@@ -14,4 +14,3 @@ def test_functions(self):
self.run_script_for_compat("%s();" % pattern)
self.assert_silent()
self.assert_compat_error(type_="notice")
-
@@ -536,6 +536,7 @@ def tests(self):
"than 0 or -1.", compat_type="error",
log_function=self.err.notice)
+
@register_generator
class Gecko13RegexTests(CompatRegexTestHelper):
"""Regex tests for Gecko 13 updates."""

0 comments on commit 3d3dc9f

Please sign in to comment.