Author: jackson
Date: 2006-06-20 13:32:03 -0400 (Tue, 20 Jun 2006)
New Revision: 61882
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
Log:
Things happen a little differently when control is created.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
2006-06-20 16:42:37 UTC (rev 61881)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
2006-06-20 17:32:03 UTC (rev 61882)
@@ -27,6 +27,11 @@
{
return IsInputKey (key);
}
+
+ protected override void WndProc (ref Message m)
+ {
+ base.WndProc (ref m);
+ }
}
[Test]
@@ -168,6 +173,34 @@
Assert.IsTrue (p.CheckIsInputKey (Keys.PageDown),
"TRUE-pagedown");
Assert.IsTrue (p.CheckIsInputKey (Keys.End),
"TRUE-end");
Assert.IsTrue (p.CheckIsInputKey (Keys.Home),
"TRUE-home");
+
+ // Create the handle, things are a little different with
+ // the handle created
+ IntPtr dummy = p.Handle;
+
+ foreach (Keys key in Enum.GetValues (typeof (Keys))) {
+ switch (key) {
+ case Keys.Left:
+ case Keys.Right:
+ case Keys.Up:
+ case Keys.Down:
+ case Keys.PageUp:
+ case Keys.PageDown:
+ case Keys.End:
+ case Keys.Home:
+ continue;
+ }
+ Assert.IsFalse (p.CheckIsInputKey (key),
"PH-FALSE- " + key);
+ }
+
+ Assert.IsTrue (p.CheckIsInputKey (Keys.Left),
"PH-TRUE-left");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.Right),
"PH-TRUE-right");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.Up),
"PH-TRUE-up");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.Down),
"PH-TRUE-down");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.PageUp),
"PH-TRUE-pageup");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.PageDown),
"PH-TRUE-pagedown");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.End),
"PH-TRUE-end");
+ Assert.IsTrue (p.CheckIsInputKey (Keys.Home),
"PH-TRUE-home");
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches