testinggtk r181 - trunk/tests/gdk



Author: bjornl
Date: Sat Jun 21 02:12:27 2008
New Revision: 181
URL: http://svn.gnome.org/viewvc/testinggtk?rev=181&view=rev

Log:
Lots of new tests that fails with warnings due to context->is_source

Modified:
   trunk/tests/gdk/test_dragcontext.py

Modified: trunk/tests/gdk/test_dragcontext.py
==============================================================================
--- trunk/tests/gdk/test_dragcontext.py	(original)
+++ trunk/tests/gdk/test_dragcontext.py	Sat Jun 21 02:12:27 2008
@@ -1,8 +1,9 @@
 '''
 Tests for the ``gtk.gdk.DragContext`` class.
 '''
+import gtk
 from gtk import gdk
-import utils
+from tests import utils
 
 def test_drag_get_selection():
     '''
@@ -14,17 +15,67 @@
     #dc = gdk.DragContext()
     #dc.drag_get_selection()
 
- utils fail_on_warnings    
+def test_get_source_widget():
+    dc = gdk.DragContext()
+    assert not dc.get_source_widget()
+
+ utils fail_on_warnings
 def test_set_icon_pixmap_no_warning():
     '''
     Ensure that ``set_icon_pixmap`` can be invoked on a newly
     constructed ``gtk.gdk.DragContext`` without producing GtkWarnings.
+
+    :bug: #539403
     '''
     pix = gdk.Pixmap(None, 100, 100, depth = 32)
     dc = gdk.DragContext()
     cmap = gdk.colormap_get_system()
     dc.set_icon_pixmap(cmap, pix, pix, 0, 0)
 
+ utils fail_on_warnings
+def test_set_icon_stock_no_warning():
+    '''
+    Ensure that ``set_icon_stock`` can be called on a newly created
+    ``gdk.DragContext`` without triggering a GtkWarning.
+
+    :bug: #539403
+    '''
+    dc = gdk.DragContext()
+    dc.set_icon_stock('stock-id', 0, 0)
+
+ utils fail_on_warnings
+def test_set_icon_widget_no_warning():
+    '''
+    :bug: #539403
+    '''
+    dc = gdk.DragContext()
+    dc.set_icon_widget(gtk.Label(), 0, 0)
+
+ utils fail_on_warnings
+def test_set_icon_pixbuf_no_warning():
+    '''
+    :bug: #539403
+    '''
+    pixbuf = gdk.Pixbuf(gdk.COLORSPACE_RGB, False, 8, 10, 10)
+    dc = gdk.DragContext()
+    dc.set_icon_pixbuf(pixbuf, 0, 0)
+
+ utils fail_on_warnings
+def test_set_icon_name_no_warning():
+    '''
+    :bug: #539403
+    '''
+    dc = gdk.DragContext()
+    dc.set_icon_name('foo', 0, 0)
+
+ utils fail_on_warnings    
+def test_set_icon_default_no_warning():
+    '''
+    :bug: #539403
+    '''
+    dc = gdk.DragContext()
+    dc.set_icon_default()
+
 def test_set_icon_pixmap_none_mask():
     '''
     Ensure that ``set_icon_pixmap`` can be invoked successfully with



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