testinggtk r397 - trunk/tests/gdk



Author: bjornl
Date: Sat Aug 30 00:37:15 2008
New Revision: 397
URL: http://svn.gnome.org/viewvc/testinggtk?rev=397&view=rev

Log:
Test check origin after reparent

Modified:
   trunk/tests/gdk/test_window.py

Modified: trunk/tests/gdk/test_window.py
==============================================================================
--- trunk/tests/gdk/test_window.py	(original)
+++ trunk/tests/gdk/test_window.py	Sat Aug 30 00:37:15 2008
@@ -155,3 +155,21 @@
     child.show()
     child.reparent(parent, 0, 0)
     assert not child.is_visible()
+
+def test_reparent_changes_origin():
+    '''
+    Ensure that reparenting a window changes its origin.
+    '''
+    parent = gdk.Window(None,
+                        100, 100,
+                        gdk.WINDOW_TOPLEVEL,
+                        0,
+                        gdk.INPUT_OUTPUT)
+    window = gdk.Window(None,
+                        20, 20,
+                        gdk.WINDOW_TOPLEVEL,
+                        0,
+                        gdk.INPUT_OUTPUT)
+    window.reparent(parent, 55, 66)
+    assert window.get_origin() == (55, 66)
+



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