testinggtk r419 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r419 - trunk/tests
- Date: Mon, 8 Sep 2008 12:47:33 +0000 (UTC)
Author: bjornl
Date: Mon Sep 8 12:47:32 2008
New Revision: 419
URL: http://svn.gnome.org/viewvc/testinggtk?rev=419&view=rev
Log:
Two new tests checking return value from the focus signal
Modified:
trunk/tests/test_scrolledwindow.py
Modified: trunk/tests/test_scrolledwindow.py
==============================================================================
--- trunk/tests/test_scrolledwindow.py (original)
+++ trunk/tests/test_scrolledwindow.py Mon Sep 8 12:47:32 2008
@@ -63,3 +63,25 @@
win.add(scroll)
win.show_all()
assert not win.get_focus()
+
+def test_focus_signal_when_it_has_focus():
+ '''
+ Ensure a scrolled window will not attempt to regrab focus if it
+ already has it.
+ '''
+ scroll = gtk.ScrolledWindow(None, None)
+ win = gtk.Window()
+ win.add(scroll)
+ scroll.grab_focus()
+ assert not scroll.emit('focus', gtk.DIR_UP)
+
+def test_focus_signal_unfocusable():
+ '''
+ Ensure that a scrolled window will not attempt to grab focus if it
+ is unfocusable.
+
+ :bug: #549262
+ '''
+ scroll = gtk.ScrolledWindow(None, None)
+ scroll.set_property('can-focus', False)
+ assert not scroll.emit('focus', gtk.DIR_UP)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]