testinggtk r338 - trunk/tests



Author: bjornl
Date: Wed Jul  2 22:22:29 2008
New Revision: 338
URL: http://svn.gnome.org/viewvc/testinggtk?rev=338&view=rev

Log:
Test for selecting menuitem with submenu

Modified:
   trunk/tests/test_menuitem.py

Modified: trunk/tests/test_menuitem.py
==============================================================================
--- trunk/tests/test_menuitem.py	(original)
+++ trunk/tests/test_menuitem.py	Wed Jul  2 22:22:29 2008
@@ -86,3 +86,19 @@
     mi.connect('toggle-size-request', cb)
     assert mi.toggle_size_request() == 0
     assert emitted[0]
+
+ utils fail_on_warnings
+def test_select_menu_item_with_submenu():
+    '''
+    Ensure that selecting a menu item with a submenu without a parent
+    works as expected.
+
+    :bug: #541315
+    '''
+    menu = gtk.Menu()
+    mi = gtk.MenuItem('hi')
+    mi.set_submenu(menu)
+    mi.select()
+    mi.select()
+    assert gtk.grab_get_current() == menu
+



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