testinggtk r325 - trunk/tests



Author: bjornl
Date: Mon Jun 30 22:38:18 2008
New Revision: 325
URL: http://svn.gnome.org/viewvc/testinggtk?rev=325&view=rev

Log:
Lots of tests for #540310

Modified:
   trunk/tests/test_window.py

Modified: trunk/tests/test_window.py
==============================================================================
--- trunk/tests/test_window.py	(original)
+++ trunk/tests/test_window.py	Mon Jun 30 22:38:18 2008
@@ -120,3 +120,71 @@
     for size in (10, 20, 100, 95):
         win.resize(size, size)
         assert win.get_size() == (size, size)
+
+def test_resize_does_not_invalidate():
+    '''
+    Ensure that resizing a shown window does not invalidate it.
+
+    :bug: #540310
+    '''
+    win = gtk.Window()
+    win.show()
+    win.set_default_size(100, 100)
+    win.resize(200, 200)
+    assert not win.window.get_update_area()
+
+def test_set_policy_does_not_invalidate():
+    '''
+    Ensure that setting the policy of a window does not invalidate it.
+
+    :bug: #540310
+    '''
+    win = gtk.Window()
+    win.show()
+    win.set_policy(False, False, False)
+    assert not win.window.get_update_area()
+
+def test_set_position_constraints_does_not_invalidate():
+    '''
+    Ensure that setting the window position constraint to
+    ``gtk.WIN_POS_CENTER_ALWAYS`` does not invalidate it.
+
+    :bug: #540310
+    '''
+    win = gtk.Window()
+    win.show()
+    win.set_position(gtk.WIN_POS_CENTER_ALWAYS)
+    assert not win.window.get_update_area()
+
+def test_set_geometry_hints_does_not_invalidate():
+    '''
+    Ensure that setting the geometry hints for a window does not
+    invalidate it.
+    '''
+    win = gtk.Window()
+    win.show()
+    win.set_geometry_hints(win)
+    assert not win.window.get_update_area()
+
+def test_set_default_size_does_not_invalidate():
+    '''
+    Ensure that setting the default size of a ``gtk.Window`` does not
+    invalidate it.
+
+    :bug: #540310
+    '''
+    win = gtk.Window()
+    win.show()
+    win.set_default_size(5321, 123)
+    assert not win.window.get_update_area()
+
+def test_set_gravity_does_not_invalidate():
+    '''
+    Ensure that setting the window gravity does not invalidate it.
+
+    :bug: #540310
+    '''
+    win = gtk.Window()
+    win.show()
+    win.set_gravity(gdk.GRAVITY_CENTER)
+    assert not win.window.get_update_area()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]