1 2from PyObjCTools.TestSupport import * 3from WebKit import * 4 5class TestWebDocumentHelper (NSObject): 6 def setNeedsLayout_(self, v): pass 7 8 def searchFor_direction_caseSensitive_wrap_(self, a, b, c, d): return 1 9 10 def supportsTextEncoding(self): return 1 11 def canProvideDocumentSource(self): return 1 12 13 14class TestWebDocument (TestCase): 15 def testMethods(self): 16 self.assertArgIsBOOL(TestWebDocumentHelper.setNeedsLayout_, 0) 17 18 self.assertResultIsBOOL(TestWebDocumentHelper.searchFor_direction_caseSensitive_wrap_) 19 self.assertArgIsBOOL(TestWebDocumentHelper.searchFor_direction_caseSensitive_wrap_, 1) 20 self.assertArgIsBOOL(TestWebDocumentHelper.searchFor_direction_caseSensitive_wrap_, 2) 21 self.assertArgIsBOOL(TestWebDocumentHelper.searchFor_direction_caseSensitive_wrap_, 3) 22 23 self.assertResultIsBOOL(TestWebDocumentHelper.supportsTextEncoding) 24 self.assertResultIsBOOL(TestWebDocumentHelper.canProvideDocumentSource) 25 26if __name__ == "__main__": 27 main() 28