mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
Add some Html unittests, and fix some issues discovered by the tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import wx.html
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class htmlprint_Tests(wtc.WidgetTestCase):
|
||||
|
||||
# TODO: Remove this test and add real ones.
|
||||
def test_htmlprint1(self):
|
||||
self.fail("Unit tests for htmlprint not implemented yet.")
|
||||
def test_htmlprint1(self):
|
||||
size = (100,100)
|
||||
bmp = wx.Bitmap(*size)
|
||||
dc = wx.MemoryDC(bmp)
|
||||
|
||||
obj = wx.html.HtmlDCRenderer()
|
||||
obj.SetDC(dc)
|
||||
obj.SetSize(*size)
|
||||
obj.SetHtmlText('<body><h1>Hello World</h1></body>')
|
||||
|
||||
obj.Render(0,0, [])
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user