From 4958c43b33f3a02982b58f612f2ba46b069d12bf Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 2 Oct 2006 14:28:22 +0200 Subject: [PATCH] Add window manager test --- tests/test-window-manager.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/test-window-manager.py diff --git a/tests/test-window-manager.py b/tests/test-window-manager.py new file mode 100755 index 00000000..413a9dd5 --- /dev/null +++ b/tests/test-window-manager.py @@ -0,0 +1,28 @@ +#!/usr/bin/python +import pygtk +pygtk.require('2.0') + +from sugar.session.UITestSession import UITestSession + +session = UITestSession() +session.start() + +import gtk + +def _show_dialog(window): + dialog = gtk.Dialog(title='No Unviewed Media', + parent=window, flags=gtk.DIALOG_MODAL, + buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) + label = gtk.Label('There is no unviewed media to download.') + dialog.vbox.pack_start(label, True, True, 0) + label.show() + response = dialog.run() + dialog.hide() + del dialog + +window = gtk.Window() +window.show() + +_show_dialog(window) + +gtk.main()