forked from mozilla/amo-validator
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mozilla#198 from wagnerand/master
Added compatibility tests for Thunderbird 19 (Bug 851922)
- Loading branch information
Showing
5 changed files
with
262 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from helper import CompatTestCase | ||
from validator.compat import TB19_DEFINITION | ||
|
||
|
||
class TestTB19Compat(CompatTestCase): | ||
"""Test that compatibility tests for Thunderbird 19 are properly executed.""" | ||
|
||
VERSION = TB19_DEFINITION | ||
|
||
def test_js_patterns(self): | ||
"""Test that these patterns are flagged in Thunderbird 19.""" | ||
self.setUp() | ||
self.run_regex_for_compat("var x = %s();" "enableEditableFields") | ||
self.assert_compat_error(type_="notice") | ||
|
||
def test_nsIMsgCompFields_newshost(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgCompFields", ["newshost"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
||
def test_nsIMsgSearchAdapter_CurrentUrlDone(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgSearchAdapter", ["CurrentUrlDone"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from helper import CompatTestCase | ||
from validator.compat import TB20_DEFINITION | ||
|
||
|
||
class TestTB20Compat(CompatTestCase): | ||
"""Test that compatibility tests for Thunderbird 20 are properly executed.""" | ||
|
||
VERSION = TB20_DEFINITION | ||
|
||
def test_js_patterns(self): | ||
"""Test that these patterns are flagged in Thunderbird 20.""" | ||
self.setUp() | ||
self.run_regex_for_compat("var x = %s();" "GetWindowByWindowType") | ||
self.assert_compat_error(type_="notice") | ||
|
||
def test_nsIMsgAccount_identities(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgAccount", ["identities"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
||
def test_nsIMsgAccountManager(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgAccountManager", | ||
["allIdentities", "GetIdentitiesForServer", "accounts", | ||
"GetServersForIdentity", "allServers"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
||
def test_nsIMsgFolder_getExpansionArray(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgFolder", ["getExpansionArray"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
||
def test_nsIMsgFilter(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgFilter", ["actionList", "getSortedActionList"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
||
def test_nsIMsgFilterService_applyFiltersToFolders(self): | ||
for method in self.run_xpcom_for_compat( | ||
"nsIMsgFilterService", ["applyFiltersToFolders"]): | ||
self.assert_silent() | ||
self.assert_compat_error(type_="warning") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters