Author: toshok
Date: 2006-10-17 19:48:12 -0400 (Tue, 17 Oct 2006)
New Revision: 66774

Modified:
   trunk/winforms/recreate/test.cs
Log:
add a couple toplevel form tests

Modified: trunk/winforms/recreate/test.cs
===================================================================
--- trunk/winforms/recreate/test.cs     2006-10-17 23:37:05 UTC (rev 66773)
+++ trunk/winforms/recreate/test.cs     2006-10-17 23:48:12 UTC (rev 66774)
@@ -50,8 +50,52 @@
 
                TestMdi ();
                TestMdi2 ();
+               TestToplevel ();
+               TestToplevel2 ();
        }
 
+       void TestToplevel ()
+       {
+               Timer timer = new Timer ();
+
+               Console.Write ("toplevel test 1:");
+
+               TortureMdiChild child = new TortureMdiChild ();
+               Button b = new Button ();
+               b.Text = "Click me if you see me";
+               b.Click += delegate (object sender, EventArgs e) { 
Console.WriteLine ("PASS"); timer.Stop (); child.Close(); };
+               b.Dock = DockStyle.Fill;
+               child.ClientSize = new Size (100, 50);
+               child.Controls.Add (b);
+
+               timer.Interval = 5000;
+               timer.Tick += delegate (object sender, EventArgs e) { 
Console.WriteLine ("FAIL (timer)"); timer.Stop (); child.Close(); };
+               timer.Start ();
+
+               child.ShowDialog (this);
+       }
+
+       void TestToplevel2 ()
+       {
+               Timer timer = new Timer ();
+
+               Console.Write ("toplevel test 2:");
+
+               TortureMdiChild child = new TortureMdiChild ();
+               Button b = new Button ();
+               b.Text = "Click me if you see me";
+               b.Click += delegate (object sender, EventArgs e) { 
Console.WriteLine ("PASS"); timer.Stop (); child.Close(); };
+               b.Dock = DockStyle.Fill;
+               child.ClientSize = new Size (100, 50);
+               child.Controls.Add (b);
+
+               timer.Interval = 5000;
+               timer.Tick += delegate (object sender, EventArgs e) { 
Console.WriteLine ("FAIL (timer)"); timer.Stop (); child.Close(); };
+               timer.Start ();
+
+               child.ShowDialog (this);
+       }
+
        void TestMdi ()
        {
                TortureMdiContainer container = new TortureMdiContainer ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to