seed r312 - trunk/tests



Author: hortont
Date: Sun Nov 23 04:59:43 2008
New Revision: 312
URL: http://svn.gnome.org/viewvc/seed?rev=312&view=rev

Log:
Add object.connect test.



Added:
   trunk/tests/signal-connect.js   (contents, props changed)
Modified:
   trunk/tests/Makefile.am

Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am	(original)
+++ trunk/tests/Makefile.am	Sun Nov 23 04:59:43 2008
@@ -33,6 +33,7 @@
     type-conversion.js \
     native-closure.js \
     gdk-event.js \
+    signal-connect.js \
     make-test.py
 
 

Added: trunk/tests/signal-connect.js
==============================================================================
--- (empty file)
+++ trunk/tests/signal-connect.js	Sun Nov 23 04:59:43 2008
@@ -0,0 +1,21 @@
+#!/usr/bin/env seed
+// Returns: 0
+// STDIN:
+// STDOUT:\[object GtkButton\]\n1\.000000\n0\.500000
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+function handle_opacity_change(obj, gobject, user_data)
+{
+	Seed.print(user_data);
+	Seed.print(user_data === button);
+	Seed.print(obj.opacity);
+}
+
+win = new Gtk.Window();
+button = new Gtk.Button();
+win.connect("notify::opacity", handle_opacity_change, button);
+win.opacity = 0.5;
+



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