Skip to content

Commit

Permalink
nsIBoxObject changes (bug 1122229)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstriemer committed Jan 29, 2015
1 parent 22c9a95 commit 908d3ff
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
52 changes: 52 additions & 0 deletions tests/compat/test_gecko35.py
@@ -0,0 +1,52 @@
from helper import CompatTestCase
from validator.compat import FX35_DEFINITION


class TestFX35Compat(CompatTestCase):
"""Test that compatibility tests for Gecko 35 are properly executed."""

VERSION = FX35_DEFINITION

def nsIBoxObject_changed(self, interface):
self.run_script_for_compat("""
var obj = Components.interfaces.{interface};
""".format(interface=interface))
self.assert_silent()
self.assert_compat_error()

def test_nsIBoxObject_changed(self):
self.nsIBoxObject_changed('nsIBoxObject')

def test_nsIBrowserBoxObject_changed(self):
self.nsIBoxObject_changed('nsIBrowserBoxObject')

def test_nsIContainerBoxObject_changed(self):
self.nsIBoxObject_changed('nsIContainerBoxObject')

def test_nsIEditorBoxObject_changed(self):
self.nsIBoxObject_changed('nsIEditorBoxObject')

def test_nsIIFrameBoxObject_changed(self):
self.nsIBoxObject_changed('nsIIFrameBoxObject')

def test_nsIListBoxObject_changed(self):
self.nsIBoxObject_changed('nsIListBoxObject')

def test_nsIMenuBoxObject_changed(self):
self.nsIBoxObject_changed('nsIMenuBoxObject')

def test_nsIPopupBoxObject_changed(self):
self.nsIBoxObject_changed('nsIPopupBoxObject')

def test_nsIScrollBoxObject_changed(self):
self.nsIBoxObject_changed('nsIScrollBoxObject')

def test_nsITreeBoxObject_changed(self):
self.nsIBoxObject_changed('nsITreeBoxObject')

def test_nsIFoo_BoxObject_no_error(self):
self.run_script_for_compat("""
var nsIFoo = myBoxObject;
""")
self.assert_silent()
self.assert_compat_silent()
22 changes: 21 additions & 1 deletion validator/testcases/regex.py
Expand Up @@ -9,7 +9,7 @@
FX18_DEFINITION, FX19_DEFINITION, FX20_DEFINITION, FX21_DEFINITION,
FX22_DEFINITION, FX23_DEFINITION, FX24_DEFINITION, FX25_DEFINITION,
FX26_DEFINITION, FX27_DEFINITION, FX28_DEFINITION, FX30_DEFINITION,
FX31_DEFINITION, FX32_DEFINITION, FX34_DEFINITION,
FX31_DEFINITION, FX32_DEFINITION, FX34_DEFINITION, FX35_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,
Expand Down Expand Up @@ -1516,6 +1516,26 @@ def tests(self):
compat_type="error")


@register_generator
class Gecko35RegexTests(CompatRegexTestHelper):
"""Regex tests for Gecko 35 updates."""

VERSION = FX35_DEFINITION

def tests(self):
box_object_subject = ("All interfaces derived from nsIBoxObject no "
"longer exist.")
yield self.get_test(
r"\bnsI\w*BoxObject\b",
box_object_subject,
box_object_subject + " If you use them with "
"QueryInterface it's likely you just need to remove "
"the function call. See %s for more information."
% BUGZILLA_BUG % 979835,
log_function=self.err.warning,
compat_type="error")


#############################
# Thunderbird Regex Tests #
#############################
Expand Down

0 comments on commit 908d3ff

Please sign in to comment.