2007-03-28 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Wed, 28 Mar 2007 17:46:01 +0000 (17:46 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Wed, 28 Mar 2007 17:46:01 +0000 (17:46 -0000)
* StatusStripTest.cs: Added.
* ToolStripContainerTest.cs: Added.
* ToolStripContentPanelTest.cs: Added.
* ToolStripDropDownTest.cs: Added.
* ToolStripManagerTest.cs: Added.
* ToolStripOverflowButtonTest.cs: Added.
* ToolStripOverflowTest.cs: Added.
* ToolStripPanelTest.cs: Added.
* ToolStripProgressBarTest.cs: Enable tests about MarqueeAnimationSpeed.
* ToolStripStatusLabelTest.cs: Added.

2007-03-28  Jonathan Pobst  <monkey@jpobst.com>

* System.Windows.Forms_test.dll.sources: Add StatusStripTest.cs,
ToolStripContainerTest.cs, ToolStripContentPanelTest.cs,
ToolStripDropDownTest.cs, ToolStripManagerTest.cs,
ToolStripOverflowButtonTest.cs, ToolStripOverflowTest.cs
ToolStripPanelTest.cs, ToolStripStatusLabelTest.cs.

svn path=/trunk/mcs/; revision=75090

13 files changed:
mcs/class/Managed.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripProgressBarTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs [new file with mode: 0644]

index 8adde927f55e91eaa1b556238ed926b3d10dd2a0..f7b5e57e4b1a99c697fc6e970e8a262acc223033 100644 (file)
@@ -1,3 +1,11 @@
+2007-03-28  Jonathan Pobst  <monkey@jpobst.com>
+
+       * System.Windows.Forms_test.dll.sources: Add StatusStripTest.cs,
+       ToolStripContainerTest.cs, ToolStripContentPanelTest.cs,
+       ToolStripDropDownTest.cs, ToolStripManagerTest.cs, 
+       ToolStripOverflowButtonTest.cs, ToolStripOverflowTest.cs
+       ToolStripPanelTest.cs, ToolStripStatusLabelTest.cs.
+
 2007-03-13  Gert Driesen  <drieseng@users.sourceforge.net>
 
        * System.Windows.Forms_test.dll.sources: Added ErrorProviderTest.cs.
index ef94843a181c1882d0207ed2f4db1e3cafe93cb4..63999f5b4c1acb1dc3bcb4b55f63500d6030b7d9 100644 (file)
@@ -96,6 +96,7 @@ System.Windows.Forms/SplitterTest.cs
 System.Windows.Forms/SplitContainerTests.cs
 System.Windows.Forms/StatusBarPanelTest.cs
 System.Windows.Forms/StatusBarTest.cs
+System.Windows.Forms/StatusStripTest.cs
 System.Windows.Forms/SystemInformationTest.cs
 System.Windows.Forms/TabControlTest.cs
 System.Windows.Forms/TestHelper.cs
@@ -106,12 +107,20 @@ System.Windows.Forms/ToolBarTest.cs
 System.Windows.Forms/ToolBarButtonTest.cs
 System.Windows.Forms/ToolStripButtonTest.cs
 System.Windows.Forms/ToolStripComboBoxTest.cs
+System.Windows.Forms/ToolStripContainerTest.cs
+System.Windows.Forms/ToolStripContentPanelTest.cs
 System.Windows.Forms/ToolStripControlHostTest.cs
+System.Windows.Forms/ToolStripDropDownTest.cs
 System.Windows.Forms/ToolStripItemTest.cs
 System.Windows.Forms/ToolStripLabelTest.cs
+System.Windows.Forms/ToolStripManagerTest.cs
 System.Windows.Forms/ToolStripMenuItemTest.cs
+System.Windows.Forms/ToolStripOverflowButtonTest.cs
+System.Windows.Forms/ToolStripOverflowTest.cs
+System.Windows.Forms/ToolStripPanelTest.cs
 System.Windows.Forms/ToolStripProgressBarTest.cs
 System.Windows.Forms/ToolStripSeparatorTest.cs
+System.Windows.Forms/ToolStripStatusLabelTest.cs
 System.Windows.Forms/ToolStripTest.cs
 System.Windows.Forms/ToolStripTextBoxTest.cs
 System.Windows.Forms/ToolTipTest.cs
index 4641cbc2e83f37dc3b75183a94b01cf80bbc18cd..0e3ae724a8792029304d79adcfd9815a20c45a4f 100644 (file)
@@ -1,3 +1,16 @@
+2007-03-28  Jonathan Pobst  <monkey@jpobst.com>
+
+       * StatusStripTest.cs: Added.
+       * ToolStripContainerTest.cs: Added.
+       * ToolStripContentPanelTest.cs: Added.
+       * ToolStripDropDownTest.cs: Added.
+       * ToolStripManagerTest.cs: Added.
+       * ToolStripOverflowButtonTest.cs: Added.
+       * ToolStripOverflowTest.cs: Added.
+       * ToolStripPanelTest.cs: Added.
+       * ToolStripProgressBarTest.cs: Enable tests about MarqueeAnimationSpeed.
+       * ToolStripStatusLabelTest.cs: Added.
+
 2007-03-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * ListViewItemTest.cs: Add tests for constructors taking
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs
new file mode 100644 (file)
index 0000000..1558bed
--- /dev/null
@@ -0,0 +1,206 @@
+//\r
+// StatusStripTests.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2006 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using System.ComponentModel;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class StatusStripTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       Assert.AreEqual (false, ts.CanOverflow, "A1");\r
+                       Assert.AreEqual (new Rectangle (1, 0, 185, 22), ts.DisplayRectangle, "A2");\r
+                       Assert.AreEqual (DockStyle.Bottom, ts.Dock, "A3");\r
+                       Assert.AreEqual (ToolStripGripStyle.Hidden, ts.GripStyle, "A4");\r
+                       Assert.AreEqual (ToolStripLayoutStyle.Table, ts.LayoutStyle, "A5");\r
+                       Assert.AreEqual (new Padding (1, 0, 14, 0), ts.Padding, "A6");\r
+                       Assert.AreEqual (false, ts.ShowItemToolTips, "A7");\r
+                       Assert.AreEqual (new Rectangle (188, 0, 12, 22), ts.SizeGripBounds, "A8");\r
+                       Assert.AreEqual (true, ts.SizingGrip, "A9");\r
+                       Assert.AreEqual (true, ts.Stretch, "A10");\r
+               }\r
+\r
+               [Test]\r
+               public void ControlStyle ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+               \r
+                       ControlStyles cs = ControlStyles.ContainerControl;\r
+                       cs |= ControlStyles.UserPaint;\r
+                       cs |= ControlStyles.ResizeRedraw;\r
+                       cs |= ControlStyles.StandardClick;\r
+                       cs |= ControlStyles.SupportsTransparentBackColor;\r
+                       cs |= ControlStyles.StandardDoubleClick;\r
+                       cs |= ControlStyles.AllPaintingInWmPaint;\r
+                       cs |= ControlStyles.OptimizedDoubleBuffer;\r
+                       cs |= ControlStyles.UseTextForAccessibility;\r
+\r
+                       Assert.AreEqual (cs, epp.GetControlStyles (), "Styles");                \r
+               }\r
+\r
+               [Test]\r
+               public void ProtectedProperties ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual (DockStyle.Bottom, epp.DefaultDock, "C1");\r
+                       Assert.AreEqual (new Padding (1, 0, 14, 0), epp.DefaultPadding, "C2");\r
+                       Assert.AreEqual (false, epp.DefaultShowItemToolTips, "C3");\r
+                       Assert.AreEqual (new Size (200, 22), epp.DefaultSize, "C4");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyCanOverflow ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.CanOverflow = true;\r
+                       Assert.AreEqual (true, ts.CanOverflow, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyDock ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+                       \r
+                       ts.Dock = DockStyle.Top;\r
+                       Assert.AreEqual (DockStyle.Top, ts.Dock, "B1");\r
+               }\r
+\r
+               [Test]\r
+               [ExpectedException (typeof (InvalidEnumArgumentException))]\r
+               public void PropertyDockIEAE ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+                       ts.Dock = (DockStyle)42;\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyGripStyle ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.GripStyle = ToolStripGripStyle.Visible;\r
+                       Assert.AreEqual (ToolStripGripStyle.Visible, ts.GripStyle, "B1");\r
+               }\r
+\r
+               [Test]\r
+               [ExpectedException (typeof (InvalidEnumArgumentException))]\r
+               public void PropertyGripStyleIEAE ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.GripStyle = (ToolStripGripStyle) 42;\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyLayoutStyle ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow;\r
+                       Assert.AreEqual (ToolStripLayoutStyle.VerticalStackWithOverflow, ts.LayoutStyle, "B1");\r
+               }\r
+\r
+               [Test]\r
+               [ExpectedException (typeof (InvalidEnumArgumentException))]\r
+               public void PropertyLayoutStyleIEAE ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.LayoutStyle = (ToolStripLayoutStyle) 42;\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyPadding ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.Padding = new Padding (7);\r
+                       Assert.AreEqual (new Padding (7), ts.Padding, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyShowItemToolTips ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.ShowItemToolTips = true;\r
+                       Assert.AreEqual (true, ts.ShowItemToolTips, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertySizingGrip ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.SizingGrip = false;\r
+                       Assert.AreEqual (false, ts.SizingGrip, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyStretch ()\r
+               {\r
+                       StatusStrip ts = new StatusStrip ();\r
+\r
+                       ts.Stretch = false;\r
+                       Assert.AreEqual (false, ts.Stretch, "B1");\r
+               }\r
+               \r
+               private class ExposeProtectedProperties : StatusStrip\r
+               {\r
+                       public new DockStyle DefaultDock { get { return base.DefaultDock; } }\r
+                       public new Padding DefaultPadding { get { return base.DefaultPadding; } }\r
+                       public new bool DefaultShowItemToolTips { get { return base.DefaultShowItemToolTips; } }\r
+                       public new Size DefaultSize { get { return base.DefaultSize; } }\r
+                       \r
+                       public ControlStyles GetControlStyles ()\r
+                       {\r
+                               ControlStyles retval = (ControlStyles) 0;\r
+                               \r
+                               foreach (ControlStyles cs in Enum.GetValues (typeof (ControlStyles)))\r
+                                       if (this.GetStyle (cs) == true)\r
+                                               retval |= cs;\r
+                                               \r
+                               return retval;\r
+                       }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs
new file mode 100644 (file)
index 0000000..7402585
--- /dev/null
@@ -0,0 +1,116 @@
+//\r
+// ToolStripContainerTests.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripContainerTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+                       ToolStripContainer tsc = new ToolStripContainer ();\r
+\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripPanel", tsc.BottomToolStripPanel.ToString (), "A1");\r
+                       Assert.AreEqual (true, tsc.BottomToolStripPanelVisible, "A2");\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripContentPanel", tsc.ContentPanel.GetType ().ToString (), "A3");\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripPanel", tsc.LeftToolStripPanel.ToString (), "A4");\r
+                       Assert.AreEqual (true, tsc.LeftToolStripPanelVisible, "A5");\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripPanel", tsc.RightToolStripPanel.ToString (), "A6");\r
+                       Assert.AreEqual (true, tsc.RightToolStripPanelVisible, "A7");\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripPanel", tsc.TopToolStripPanel.ToString (), "A8");\r
+                       Assert.AreEqual (true, tsc.TopToolStripPanelVisible, "A9");\r
+               }\r
+\r
+               [Test]\r
+               public void ProtectedProperties ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual (new Size (150, 175), epp.DefaultSize, "C1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyBottomToolStripPanelVisible ()\r
+               {\r
+                       ToolStripContainer tsc = new ToolStripContainer ();\r
+\r
+                       tsc.BottomToolStripPanelVisible = false; ;\r
+                       Assert.AreEqual (false, tsc.BottomToolStripPanelVisible, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyLeftToolStripPanelVisible ()\r
+               {\r
+                       ToolStripContainer tsc = new ToolStripContainer ();\r
+\r
+                       tsc.LeftToolStripPanelVisible = false; ;\r
+                       Assert.AreEqual (false, tsc.LeftToolStripPanelVisible, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyRightToolStripPanelVisible ()\r
+               {\r
+                       ToolStripContainer tsc = new ToolStripContainer ();\r
+\r
+                       tsc.RightToolStripPanelVisible = false; ;\r
+                       Assert.AreEqual (false, tsc.RightToolStripPanelVisible, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyTopToolStripPanelVisible ()\r
+               {\r
+                       ToolStripContainer tsc = new ToolStripContainer ();\r
+\r
+                       tsc.TopToolStripPanelVisible = false; ;\r
+                       Assert.AreEqual (false, tsc.TopToolStripPanelVisible, "B1");\r
+               }\r
+\r
+               [Test]\r
+               public void MethodCreateControlsInstance ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripContainer+ToolStripContainerTypedControlCollection", epp.CreateControlsInstance (). GetType ().ToString (), "B1");\r
+               }\r
+               \r
+               private class ExposeProtectedProperties : ToolStripContainer\r
+               {\r
+                       public new Size DefaultSize { get { return base.DefaultSize; } }\r
+                       public new ControlCollection CreateControlsInstance () { return base.CreateControlsInstance (); }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs
new file mode 100644 (file)
index 0000000..f6eae50
--- /dev/null
@@ -0,0 +1,123 @@
+//\r
+// ToolStripContentPanelTests.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripContentPanelTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+                       ToolStripContentPanel tsp = new ToolStripContentPanel ();\r
+\r
+                       Assert.AreEqual (SystemColors.Control, tsp.BackColor, "A1");\r
+                       //Assert.AreEqual ("System.Windows.Forms.ToolStripSystemRenderer", tsp.Renderer.ToString (), "A2");\r
+                       //Assert.AreEqual (ToolStripRenderMode.System, tsp.RenderMode, "A3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyBackColor ()\r
+               {\r
+                       ToolStripContentPanel tsp = new ToolStripContentPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.BackColor = Color.Green;\r
+                       Assert.AreEqual (Color.Green, tsp.BackColor, "B1");\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.BackColor = Color.Green;\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyRenderer ()\r
+               {\r
+                       ToolStripContentPanel tsp = new ToolStripContentPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       ToolStripProfessionalRenderer pr = new ToolStripProfessionalRenderer ();\r
+\r
+                       tsp.Renderer = pr;\r
+                       Assert.AreSame (pr, tsp.Renderer, "B1");\r
+                       Assert.AreEqual (ToolStripRenderMode.Custom, tsp.RenderMode, "B1-2");\r
+                       // I refuse to call the event twice like .Net does.\r
+                       //Assert.AreEqual ("RendererChanged;RendererChanged", ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.Renderer = pr;\r
+                       //Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyRenderMode ()\r
+               {\r
+                       ToolStripContentPanel tsp = new ToolStripContentPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.RenderMode = ToolStripRenderMode.ManagerRenderMode;\r
+                       Assert.AreEqual (ToolStripRenderMode.ManagerRenderMode, tsp.RenderMode, "B1");\r
+                       // I refuse to call the event twice like .Net does.\r
+                       //Assert.AreEqual ("RendererChanged;RendererChanged", ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.RenderMode = ToolStripRenderMode.ManagerRenderMode;\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               private class EventWatcher\r
+               {\r
+                       private string events = string.Empty;\r
+\r
+                       public EventWatcher (ToolStripContentPanel tsp)\r
+                       {\r
+                               tsp.Load += new EventHandler (delegate (Object obj, EventArgs e) { events += ("Load;"); });\r
+                               tsp.RendererChanged += new EventHandler (delegate (Object obj, EventArgs e) { events += ("RendererChanged;"); });\r
+                       }\r
+\r
+                       public override string ToString ()\r
+                       {\r
+                               return events.TrimEnd (';');\r
+                       }\r
+\r
+                       public void Clear ()\r
+                       {\r
+                               events = string.Empty;\r
+                       }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs
new file mode 100644 (file)
index 0000000..3111372
--- /dev/null
@@ -0,0 +1,144 @@
+//\r
+// ToolStripDropDownTests.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripDropDownTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+                       ToolStripDropDown tsdd = new ToolStripDropDown ();\r
+\r
+                       Assert.AreEqual (false, tsdd.AllowTransparency, "A1");\r
+                       Assert.AreEqual (true, tsdd.AutoClose, "A2");\r
+                       Assert.AreEqual (false, tsdd.CanOverflow, "A3");\r
+                       Assert.AreEqual (ToolStripDropDownDirection.Right, tsdd.DefaultDropDownDirection, "A4");\r
+                       Assert.AreEqual (true, tsdd.DropShadowEnabled, "A5");\r
+                       Assert.AreEqual (false, tsdd.IsAutoGenerated, "A6");\r
+                       Assert.AreEqual (1, tsdd.Opacity, "A7");\r
+                       Assert.AreEqual (null, tsdd.OwnerItem, "A8");\r
+                       Assert.AreEqual (null, tsdd.Region, "A9");\r
+                       Assert.AreEqual (RightToLeft.No, tsdd.RightToLeft, "A10");\r
+                       //Assert.AreEqual (ToolStripTextDirection.Horizontal, tsdd.TextDirection, "A11");\r
+                       Assert.AreEqual (true, tsdd.TopLevel, "A12");\r
+                       Assert.AreEqual (false, tsdd.Visible, "A13");\r
+               }\r
+\r
+               [Test]\r
+               public void ProtectedProperties ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual (WindowStyles.WS_TILED | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_POPUP, (WindowStyles)epp.CreateParams.Style, "C1");\r
+                       // This makes no sense\r
+                       // Assert.AreEqual (WindowExStyles.WS_EX_CONTROLPARENT, (WindowExStyles)epp.CreateParams.ExStyle, "C2");\r
+                       Assert.AreEqual (DockStyle.None, epp.DefaultDock, "C3");\r
+                       Assert.AreEqual (new Padding (1, 2, 1, 2), epp.DefaultPadding, "C4");\r
+                       Assert.AreEqual (true, epp.DefaultShowItemToolTips, "C5");\r
+                       // Dependent on monitor resolution\r
+                       // Assert.AreEqual (new Size (1678, 1016), epp.MaxItemSize, "C6");\r
+                       Assert.AreEqual (true, epp.TopMost, "C7");\r
+               }\r
+\r
+               [Test]\r
+               public void MethodCreateLayoutSettings ()\r
+               {\r
+                       ExposeProtectedProperties ts = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual ("System.Windows.Forms.FlowLayoutSettings", ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.Flow).ToString (), "A1");\r
+                       Assert.AreEqual (null, ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.HorizontalStackWithOverflow), "A2");\r
+                       Assert.AreEqual (null, ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.StackWithOverflow), "A3");\r
+                       //Assert.AreEqual ("System.Windows.Forms.TableLayoutSettings", ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.Table).ToString (), "A4");\r
+                       Assert.AreEqual (null, ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.VerticalStackWithOverflow), "A5");\r
+               }\r
+\r
+               //[Test]\r
+               //public void Accessibility ()\r
+               //{\r
+               //        ToolStripSeparator tsi = new ToolStripSeparator ();\r
+               //        AccessibleObject ao = tsi.AccessibilityObject;\r
+\r
+               //        Assert.AreEqual ("ToolStripItemAccessibleObject: Owner = " + tsi.ToString (), ao.ToString (), "L");\r
+               //        Assert.AreEqual (Rectangle.Empty, ao.Bounds, "L1");\r
+               //        Assert.AreEqual ("Press", ao.DefaultAction, "L2");\r
+               //        Assert.AreEqual (null, ao.Description, "L3");\r
+               //        Assert.AreEqual (null, ao.Help, "L4");\r
+               //        Assert.AreEqual (string.Empty, ao.KeyboardShortcut, "L5");\r
+               //        Assert.AreEqual (string.Empty, ao.Name, "L6");\r
+               //        Assert.AreEqual (null, ao.Parent, "L7");\r
+               //        Assert.AreEqual (AccessibleRole.Separator, ao.Role, "L8");\r
+               //        Assert.AreEqual (AccessibleStates.None, ao.State, "L9");\r
+               //        Assert.AreEqual (string.Empty, ao.Value, "L10");\r
+\r
+               //        tsi.Name = "Label1";\r
+               //        tsi.Text = "Test Label";\r
+               //        tsi.AccessibleDescription = "Label Desc";\r
+\r
+               //        Assert.AreEqual (Rectangle.Empty, ao.Bounds, "L11");\r
+               //        Assert.AreEqual ("Press", ao.DefaultAction, "L12");\r
+               //        Assert.AreEqual ("Label Desc", ao.Description, "L13");\r
+               //        Assert.AreEqual (null, ao.Help, "L14");\r
+               //        Assert.AreEqual (string.Empty, ao.KeyboardShortcut, "L15");\r
+               //        Assert.AreEqual ("Test Label", ao.Name, "L16");\r
+               //        Assert.AreEqual (null, ao.Parent, "L17");\r
+               //        Assert.AreEqual (AccessibleRole.Separator, ao.Role, "L18");\r
+               //        Assert.AreEqual (AccessibleStates.None, ao.State, "L19");\r
+               //        Assert.AreEqual (string.Empty, ao.Value, "L20");\r
+\r
+               //        tsi.AccessibleName = "Access Label";\r
+               //        Assert.AreEqual ("Access Label", ao.Name, "L21");\r
+\r
+               //        tsi.Text = "Test Label";\r
+               //        Assert.AreEqual ("Access Label", ao.Name, "L22");\r
+\r
+               //        tsi.AccessibleDefaultActionDescription = "AAA";\r
+               //        Assert.AreEqual ("AAA", tsi.AccessibleDefaultActionDescription, "L23");\r
+               //}\r
+\r
+               private class ExposeProtectedProperties : ToolStripDropDown\r
+               {\r
+                       public new CreateParams CreateParams { get { return base.CreateParams; } }\r
+                       public new DockStyle DefaultDock { get { return base.DefaultDock; } }\r
+                       public new Padding DefaultPadding { get { return base.DefaultPadding; } }\r
+                       public new bool DefaultShowItemToolTips { get { return base.DefaultShowItemToolTips; } }\r
+                       //public new Size MaxItemSize { get { return base.MaxItemSize; } }\r
+                       public new bool TopMost { get { return base.TopMost; } }\r
+                       public LayoutSettings PublicCreateLayoutSettings (ToolStripLayoutStyle style) { return base.CreateLayoutSettings (style); }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs
new file mode 100644 (file)
index 0000000..fba8614
--- /dev/null
@@ -0,0 +1,119 @@
+//\r
+// ToolStripManagerTest.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2006 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripManagerTest\r
+       {\r
+               [Test]\r
+               [Ignore ("This has to run all by itself.  Toolstrips in other tests register themselves and mess this up.")]\r
+               public void BehaviorFindToolStrip ()\r
+               {\r
+                       // Default stuff\r
+                       Assert.AreEqual (null, ToolStripManager.FindToolStrip (string.Empty), "A1");\r
+                       Assert.AreEqual (null, ToolStripManager.FindToolStrip ("MyStrip"), "A2");\r
+                       \r
+                       ToolStrip ts = new ToolStrip ();\r
+                       ts.Name = "MyStrip";\r
+\r
+                       // Basic operation\r
+                       Assert.AreSame (ts, ToolStripManager.FindToolStrip ("MyStrip"), "A3");\r
+                       \r
+                       // Dispose removes them\r
+                       ts.Dispose ();\r
+                       Assert.AreEqual (null, ToolStripManager.FindToolStrip ("MyStrip"), "A4");\r
+                       \r
+                       ts = new ToolStrip ();\r
+                       ts.Name = "MyStrip1";\r
+                       MenuStrip ms = new MenuStrip ();\r
+                       ms.Name = "MyStrip2";\r
+\r
+                       // Basic operation\r
+                       Assert.AreSame (ts, ToolStripManager.FindToolStrip ("MyStrip1"), "A5");\r
+                       Assert.AreSame (ms, ToolStripManager.FindToolStrip ("MyStrip2"), "A6");\r
+               \r
+                       // Find unnamed strip\r
+                       StatusStrip ss = new StatusStrip ();\r
+                       Assert.AreEqual (ss, ToolStripManager.FindToolStrip (string.Empty), "A7");\r
+                       \r
+                       // Always return first unnamed strip\r
+                       ContextMenuStrip cms = new ContextMenuStrip ();\r
+                       Assert.AreEqual (ss, ToolStripManager.FindToolStrip (string.Empty), "A8");\r
+                       \r
+                       // Remove first unnamed strip, returns second one\r
+                       ss.Dispose ();\r
+                       Assert.AreEqual (cms, ToolStripManager.FindToolStrip (string.Empty), "A9");\r
+                       \r
+                       // ContextMenuStrips are included\r
+                       cms.Name = "Context";\r
+                       Assert.AreEqual (cms, ToolStripManager.FindToolStrip ("Context"), "A10");\r
+               }\r
+               \r
+               [Test]\r
+               public void MethodIsShortcutValid ()\r
+               {\r
+                       Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.F1), "A1");\r
+                       Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.F7), "A1");\r
+                       Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.Shift | Keys.F1), "A1");\r
+                       Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.Control | Keys.F1), "A1");\r
+                       Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.Shift), "A1");\r
+                       Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.Alt), "A1");\r
+                       Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.D6), "A1");\r
+                       Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.Control | Keys.S), "A1");\r
+                       Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.L), "A1");\r
+               }\r
+               \r
+               [Test]\r
+               public void TwoShortcuts ()\r
+               {\r
+                       ToolStripMenuItem tsmi = new ToolStripMenuItem ();\r
+                       tsmi.ShortcutKeys = Keys.Control | Keys.D;\r
+                       ToolStripMenuItem tsmi2 = new ToolStripMenuItem ();\r
+                       tsmi2.ShortcutKeys = Keys.Control | Keys.D;\r
+\r
+                       Assert.AreEqual (Keys.Control | Keys.D, tsmi.ShortcutKeys, "A1");\r
+                       Assert.AreEqual (Keys.Control | Keys.D, tsmi2.ShortcutKeys, "A2");\r
+                       \r
+                       ToolStrip ts = new ToolStrip ();\r
+                       ts.Items.Add (tsmi);\r
+                       ts.Items.Add (tsmi2);\r
+\r
+                       Assert.AreEqual (Keys.Control | Keys.D, tsmi.ShortcutKeys, "A3");\r
+                       Assert.AreEqual (Keys.Control | Keys.D, tsmi2.ShortcutKeys, "A4");\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs
new file mode 100644 (file)
index 0000000..b719a1b
--- /dev/null
@@ -0,0 +1,143 @@
+//\r
+// ToolStripOverflowButtonTest.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2006 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using System.ComponentModel;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripOverflowButtonTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+               }\r
+\r
+               [Test]\r
+               public void ProtectedProperties ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual (new Padding (0, 1, 0, 2), epp.DefaultMargin, "C1");\r
+               }\r
+\r
+               [Test]\r
+               public void Size2 ()\r
+               {\r
+                       Form f = new Form ();\r
+                       f.ShowInTaskbar = false;\r
+                       f.Show ();\r
+\r
+                       ToolStrip ts = new ToolStrip ();\r
+                       f.Controls.Add (ts);\r
+                       ToolStripOverflowButton tsi = ts.OverflowButton;\r
+\r
+                       Assert.AreEqual (new Size (16, 25), tsi.Size, "B1");\r
+                       Assert.AreEqual (false, tsi.Visible, "B3");\r
+                       ToolStripItem test = ts.Items.Add ("test");\r
+                       test.Overflow = ToolStripItemOverflow.Always;\r
+                       ts.PerformLayout ();\r
+\r
+                       Assert.AreEqual (Size.Empty, tsi.Size, "B2");\r
+                       f.Hide ();\r
+               }\r
+\r
+               [Test]\r
+               public void MethodGetPreferredSize ()\r
+               {\r
+                       Form f = new Form ();\r
+                       f.ShowInTaskbar = false;\r
+                       f.Show ();\r
+\r
+                       ToolStrip ts = new ToolStrip ();\r
+                       f.Controls.Add (ts);\r
+                       ToolStripOverflowButton tsi = ts.OverflowButton;\r
+\r
+                       Assert.AreEqual (Size.Empty, tsi.GetPreferredSize (Size.Empty), "B1");\r
+                       Assert.AreEqual (false, tsi.Visible, "B2");\r
+                       \r
+                       ToolStripItem test = ts.Items.Add ("test");\r
+                       test.Overflow = ToolStripItemOverflow.Always;\r
+                       ts.PerformLayout ();\r
+\r
+                       Assert.AreEqual (new Size (16, 25), tsi.GetPreferredSize (new Size (100, 100)), "B3");\r
+                       Assert.AreEqual (false, tsi.Visible, "B4");\r
+                       f.Hide ();\r
+               }\r
+               \r
+               [Test]\r
+               public void BehaviorItemsOnOverflow ()\r
+               {\r
+                       Form f = new Form ();\r
+                       f.ShowInTaskbar = false;\r
+                       MyToolStrip ts = new MyToolStrip ();\r
+                       f.Controls.Add (ts);\r
+                       f.Show ();\r
+                       \r
+                       Assert.AreEqual (0, ts.Items.Count, "A1");\r
+                       Assert.AreEqual (1, ts.PublicDisplayedItems.Count, "A2");\r
+                       Assert.AreEqual (false, ts.OverflowButton.Visible, "A3");\r
+                       Assert.AreEqual (0, ts.OverflowButton.DropDown.Items.Count, "A3");\r
+\r
+                       ToolStripItem tsi = ts.Items.Add ("test");\r
+\r
+                       Assert.AreEqual (1, ts.Items.Count, "A4");\r
+                       Assert.AreEqual (2, ts.PublicDisplayedItems.Count, "A5");\r
+                       Assert.AreEqual (false, ts.OverflowButton.Visible, "A3");\r
+                       Assert.AreEqual (0, ts.OverflowButton.DropDown.Items.Count, "A6");\r
+\r
+                       tsi.Overflow = ToolStripItemOverflow.Always;\r
+\r
+                       Assert.AreEqual (1, ts.Items.Count, "A7");\r
+                       Assert.AreEqual (2, ts.PublicDisplayedItems.Count, "A8");\r
+                       Assert.AreEqual (true, ts.OverflowButton.Visible, "A3");\r
+                       Assert.AreEqual (0, ts.OverflowButton.DropDown.Items.Count, "A9");\r
+                       Console.WriteLine (ts.PublicDisplayedItems[1].GetType().ToString());\r
+                       f.Dispose ();\r
+               }\r
+               \r
+               private class ExposeProtectedProperties : ToolStripButton\r
+               {\r
+                       public new Padding DefaultMargin { get { return base.DefaultMargin; } }\r
+               }\r
+               \r
+               private class MyToolStrip : ToolStrip\r
+               {\r
+                       public ToolStripItemCollection PublicDisplayedItems {\r
+                               get { return base.DisplayedItems; }\r
+                       }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs
new file mode 100644 (file)
index 0000000..cf77357
--- /dev/null
@@ -0,0 +1,51 @@
+//\r
+// ToolStripOverflowTest.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2006 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using System.ComponentModel;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripOverflowTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+                       ToolStripOverflow tso = (ToolStripOverflow)new ToolStrip ().OverflowButton.DropDown;\r
+                       \r
+                       Assert.AreEqual ("System.Windows.Forms.Layout.FlowLayout", tso.LayoutEngine.ToString (), "A1");\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs
new file mode 100644 (file)
index 0000000..b506c07
--- /dev/null
@@ -0,0 +1,213 @@
+//\r
+// ToolStripPanelTests.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripPanelTests\r
+       {\r
+               [Test]\r
+               public void Constructor ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+\r
+                       Assert.AreEqual (true, tsp.AutoSize, "A1");\r
+                       Assert.AreEqual (DockStyle.None, tsp.Dock, "A2");\r
+                       Assert.AreEqual ("System.Windows.Forms.Layout.FlowLayout", tsp.LayoutEngine.ToString (), "A3");\r
+                       Assert.AreEqual (false, tsp.Locked, "A4");\r
+                       Assert.AreEqual (Orientation.Horizontal, tsp.Orientation, "A5");\r
+                       Assert.AreSame (ToolStripManager.Renderer, tsp.Renderer, "A6");\r
+                       Assert.AreEqual (ToolStripRenderMode.ManagerRenderMode, tsp.RenderMode, "A7");\r
+                       Assert.AreEqual (new Padding (3, 0, 0, 0), tsp.RowMargin, "A8");\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripPanelRow[]", tsp.Rows.ToString (), "A9");\r
+               }\r
+\r
+               [Test]\r
+               public void ProtectedProperties ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual (new Padding (0), epp.DefaultMargin, "C1");\r
+                       Assert.AreEqual (new Padding (0), epp.DefaultPadding, "C2");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyAutoSize ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.AutoSize = false;\r
+                       Assert.AreEqual (false, tsp.AutoSize, "B1");\r
+                       Assert.AreEqual ("AutoSizeChanged", ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.AutoSize = false;\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyDock ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.Dock = DockStyle.Left;\r
+                       Assert.AreEqual (DockStyle.Left, tsp.Dock, "B1");\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.Dock = DockStyle.Left;\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyLocked ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.Locked = true;\r
+                       Assert.AreEqual (true, tsp.Locked, "B1");\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.Locked = true;\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyOrientation ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.Orientation = Orientation.Vertical;\r
+                       Assert.AreEqual (Orientation.Vertical, tsp.Orientation, "B1");\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.Orientation = Orientation.Vertical;\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyRenderer ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       ToolStripProfessionalRenderer pr = new ToolStripProfessionalRenderer ();\r
+\r
+                       tsp.Renderer = pr;\r
+                       Assert.AreSame (pr, tsp.Renderer, "B1");\r
+                       Assert.AreEqual (ToolStripRenderMode.Custom, tsp.RenderMode, "B1-2");\r
+                       // I refuse to call the event twice like .Net does.\r
+                       //Assert.AreEqual ("RendererChanged;RendererChanged", ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.Renderer = pr;\r
+                       //Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyRenderMode ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.RenderMode = ToolStripRenderMode.System;\r
+                       Assert.AreEqual (ToolStripRenderMode.System, tsp.RenderMode, "B1");\r
+                       // I refuse to call the event twice like .Net does.\r
+                       //Assert.AreEqual ("RendererChanged;RendererChanged", ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.RenderMode = ToolStripRenderMode.System;\r
+                       //Assert.AreEqual ("RendererChanged", ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void PropertyRowMargin ()\r
+               {\r
+                       ToolStripPanel tsp = new ToolStripPanel ();\r
+                       EventWatcher ew = new EventWatcher (tsp);\r
+\r
+                       tsp.RowMargin = new Padding (4);\r
+                       Assert.AreEqual (new Padding (4), tsp.RowMargin, "B1");\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B2");\r
+\r
+                       ew.Clear ();\r
+                       tsp.RowMargin = new Padding (4);\r
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");\r
+               }\r
+\r
+               [Test]\r
+               public void MethodCreateControlsInstance ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual ("System.Windows.Forms.ToolStripPanel+ToolStripPanelControlCollection", epp.CreateControlsInstance (). GetType ().ToString (), "B1");\r
+               }\r
+\r
+               private class EventWatcher\r
+               {\r
+                       private string events = string.Empty;\r
+\r
+                       public EventWatcher (ToolStripPanel tsp)\r
+                       {\r
+                               tsp.AutoSizeChanged += new EventHandler (delegate (Object obj, EventArgs e) { events += ("AutoSizeChanged;"); });\r
+                               tsp.RendererChanged += new EventHandler (delegate (Object obj, EventArgs e) { events += ("RendererChanged;"); });\r
+                       }\r
+\r
+                       public override string ToString ()\r
+                       {\r
+                               return events.TrimEnd (';');\r
+                       }\r
+\r
+                       public void Clear ()\r
+                       {\r
+                               events = string.Empty;\r
+                       }\r
+               }\r
+\r
+               private class ExposeProtectedProperties : ToolStripPanel\r
+               {\r
+                       public new Padding DefaultMargin { get { return base.DefaultMargin; } }\r
+                       public new Padding DefaultPadding { get { return base.DefaultPadding; } }\r
+                       public new ControlCollection CreateControlsInstance () { return base.CreateControlsInstance (); }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file
index 161816440629b49179625ea8bced47542a789150..ed1534219b080d0c6b40328b1f13107ed3eb0ae1 100644 (file)
@@ -44,7 +44,7 @@ namespace MonoTests.System.Windows.Forms
                {
                        ToolStripProgressBar tsi = new ToolStripProgressBar ();
 
-                       //Assert.AreEqual (100, tsi.MarqueeAnimationSpeed, "A1");
+                       Assert.AreEqual (100, tsi.MarqueeAnimationSpeed, "A1");
                        Assert.AreEqual (100, tsi.Maximum, "A2");
                        Assert.AreEqual (0, tsi.Minimum, "A3");
                        Assert.AreEqual ("System.Windows.Forms.ProgressBar", tsi.ProgressBar.GetType ().ToString (), "A4");
@@ -68,20 +68,20 @@ namespace MonoTests.System.Windows.Forms
                        Assert.AreEqual (new Size (100, 15), epp.DefaultSize, "C2");
                }
 
-               //[Test]
-               //public void PropertyMarqueeAnimationSpeed ()
-               //{
-               //        ToolStripProgressBar tsi = new ToolStripProgressBar ();
-               //        EventWatcher ew = new EventWatcher (tsi);
+               [Test]
+               public void PropertyMarqueeAnimationSpeed ()
+               {
+                       ToolStripProgressBar tsi = new ToolStripProgressBar ();
+                       EventWatcher ew = new EventWatcher (tsi);
 
-               //        tsi.MarqueeAnimationSpeed = 200;
-               //        Assert.AreEqual (200, tsi.MarqueeAnimationSpeed, "B1");
-               //        Assert.AreEqual (string.Empty, ew.ToString (), "B2");
+                       tsi.MarqueeAnimationSpeed = 200;
+                       Assert.AreEqual (200, tsi.MarqueeAnimationSpeed, "B1");
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B2");
 
-               //        ew.Clear ();
-               //        tsi.MarqueeAnimationSpeed = 200;
-               //        Assert.AreEqual (string.Empty, ew.ToString (), "B3");
-               //}
+                       ew.Clear ();
+                       tsi.MarqueeAnimationSpeed = 200;
+                       Assert.AreEqual (string.Empty, ew.ToString (), "B3");
+               }
 
                [Test]
                public void PropertyMaximum ()
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs
new file mode 100644 (file)
index 0000000..ebac857
--- /dev/null
@@ -0,0 +1,207 @@
+//\r
+// ToolStripStatusLabelTests.cs\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2006 Jonathan Pobst\r
+//\r
+// Authors:\r
+//     Jonathan Pobst (monkey@jpobst.com)\r
+//\r
+#if NET_2_0\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using NUnit.Framework;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+       [TestFixture]\r
+       public class ToolStripStatusLabelTests\r
+       {\r
+               //[Test]\r
+               //public void Constructor ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        Assert.AreEqual (Color.Red, tsi.ActiveLinkColor, "A1");\r
+               //        Assert.AreEqual (false, tsi.CanSelect, "A2");\r
+               //        Assert.AreEqual (false, tsi.IsLink, "A3");\r
+               //        Assert.AreEqual (LinkBehavior.SystemDefault, tsi.LinkBehavior, "A4");\r
+               //        Assert.AreEqual (Color.FromArgb (0,0,255), tsi.LinkColor, "A5");\r
+               //        Assert.AreEqual (false, tsi.LinkVisited, "A6");\r
+               //        Assert.AreEqual (Color.FromArgb (128, 0, 128), tsi.VisitedLinkColor, "A7");\r
+\r
+               //        int count = 0;\r
+               //        EventHandler oc = new EventHandler (delegate (object sender, EventArgs e) { count++; });\r
+               //        Image i = new Bitmap (1,1);\r
+\r
+               //        tsi = new ToolStripLabel (i);\r
+               //        tsi.PerformClick();\r
+               //        Assert.AreEqual (null, tsi.Text, "A8");\r
+               //        Assert.AreSame (i, tsi.Image, "A9");\r
+               //        Assert.AreEqual (false, tsi.IsLink, "A10");\r
+               //        Assert.AreEqual (0, count, "A11");\r
+               //        Assert.AreEqual (string.Empty, tsi.Name, "A12");\r
+\r
+               //        tsi = new ToolStripLabel ("Text");\r
+               //        tsi.PerformClick ();\r
+               //        Assert.AreEqual ("Text", tsi.Text, "A13");\r
+               //        Assert.AreSame (null, tsi.Image, "A14");\r
+               //        Assert.AreEqual (false, tsi.IsLink, "A15");\r
+               //        Assert.AreEqual (0, count, "A16");\r
+               //        Assert.AreEqual (string.Empty, tsi.Name, "A17");\r
+\r
+               //        tsi = new ToolStripLabel ("Text", i);\r
+               //        tsi.PerformClick ();\r
+               //        Assert.AreEqual ("Text", tsi.Text, "A18");\r
+               //        Assert.AreSame (i, tsi.Image, "A19");\r
+               //        Assert.AreEqual (false, tsi.IsLink, "A20");\r
+               //        Assert.AreEqual (0, count, "A21");\r
+               //        Assert.AreEqual (string.Empty, tsi.Name, "A22");\r
+\r
+               //        tsi = new ToolStripLabel ("Text", i, true);\r
+               //        tsi.PerformClick ();\r
+               //        Assert.AreEqual ("Text", tsi.Text, "A23");\r
+               //        Assert.AreSame (i, tsi.Image, "A24");\r
+               //        Assert.AreEqual (true, tsi.IsLink, "A25");\r
+               //        Assert.AreEqual (0, count, "A26");\r
+               //        Assert.AreEqual (string.Empty, tsi.Name, "A27");\r
+\r
+               //        tsi = new ToolStripLabel ("Text", i, true, oc);\r
+               //        tsi.PerformClick ();\r
+               //        Assert.AreEqual ("Text", tsi.Text, "A28");\r
+               //        Assert.AreSame (i, tsi.Image, "A29");\r
+               //        Assert.AreEqual (true, tsi.IsLink, "A30");\r
+               //        Assert.AreEqual (1, count, "A31");\r
+               //        Assert.AreEqual (string.Empty, tsi.Name, "A32");\r
+\r
+               //        tsi = new ToolStripLabel ("Text", i, true, oc, "Name");\r
+               //        tsi.PerformClick ();\r
+               //        Assert.AreEqual ("Text", tsi.Text, "A33");\r
+               //        Assert.AreSame (i, tsi.Image, "A34");\r
+               //        Assert.AreEqual (true, tsi.IsLink, "A35");\r
+               //        Assert.AreEqual (2, count, "A36");\r
+               //        Assert.AreEqual ("Name", tsi.Name, "A37");\r
+               //}\r
+\r
+               [Test]\r
+               public void ProtectedProperties ()\r
+               {\r
+                       ExposeProtectedProperties epp = new ExposeProtectedProperties ();\r
+\r
+                       Assert.AreEqual (new Padding (0, 3, 0, 2), epp.DefaultMargin, "C3");\r
+               }\r
+\r
+               //[Test]\r
+               //public void PropertyActiveLinkColor ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        tsi.ActiveLinkColor = Color.Green;\r
+               //        Assert.AreEqual (Color.Green, tsi.ActiveLinkColor, "B1");\r
+               //}\r
+\r
+               //[Test]\r
+               //public void PropertyIsLink ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        tsi.IsLink = true;\r
+               //        Assert.AreEqual (true, tsi.IsLink, "B1");\r
+               //}\r
+\r
+               //[Test]\r
+               //public void PropertyLinkBehavior ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        tsi.LinkBehavior = LinkBehavior.NeverUnderline;\r
+               //        Assert.AreEqual (LinkBehavior.NeverUnderline, tsi.LinkBehavior, "B1");\r
+               //}\r
+\r
+               //[Test]\r
+               //public void PropertyLinkColor ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        tsi.LinkColor = Color.Green;\r
+               //        Assert.AreEqual (Color.Green, tsi.LinkColor, "B1");\r
+               //}\r
+\r
+               //[Test]\r
+               //public void PropertyLinkVisited ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        tsi.LinkVisited = true;\r
+               //        Assert.AreEqual (true, tsi.LinkVisited, "B1");\r
+               //}\r
+\r
+               //[Test]\r
+               //public void PropertyVisitedLinkColor ()\r
+               //{\r
+               //        ToolStripLabel tsi = new ToolStripLabel ();\r
+\r
+               //        tsi.VisitedLinkColor = Color.Green;\r
+               //        Assert.AreEqual (Color.Green, tsi.VisitedLinkColor, "B1");\r
+               //}\r
+\r
+\r
+               //[Test]\r
+               //public void PropertyAnchorAndDocking ()\r
+               //{\r
+               //        ToolStripItem ts = new NullToolStripItem ();\r
+\r
+               //        ts.Anchor = AnchorStyles.Top | AnchorStyles.Bottom;\r
+\r
+               //        Assert.AreEqual (AnchorStyles.Top | AnchorStyles.Bottom, ts.Anchor, "A1");\r
+               //        Assert.AreEqual (DockStyle.None, ts.Dock, "A2");\r
+\r
+               //        ts.Anchor = AnchorStyles.Left | AnchorStyles.Right;\r
+\r
+               //        Assert.AreEqual (AnchorStyles.Left | AnchorStyles.Right, ts.Anchor, "A1");\r
+               //        Assert.AreEqual (DockStyle.None, ts.Dock, "A2");\r
+\r
+               //        ts.Dock = DockStyle.Left;\r
+\r
+               //        Assert.AreEqual (AnchorStyles.Top | AnchorStyles.Left, ts.Anchor, "A1");\r
+               //        Assert.AreEqual (DockStyle.Left, ts.Dock, "A2");\r
+\r
+               //        ts.Dock = DockStyle.None;\r
+\r
+               //        Assert.AreEqual (AnchorStyles.Top | AnchorStyles.Left, ts.Anchor, "A1");\r
+               //        Assert.AreEqual (DockStyle.None, ts.Dock, "A2");\r
+\r
+               //        ts.Dock = DockStyle.Top;\r
+\r
+               //        Assert.AreEqual (AnchorStyles.Top | AnchorStyles.Left, ts.Anchor, "A1");\r
+               //        Assert.AreEqual (DockStyle.Top, ts.Dock, "A2");\r
+               //}\r
+\r
+               private class ExposeProtectedProperties : ToolStripStatusLabel\r
+               {\r
+                       public new Padding DefaultMargin { get { return base.DefaultMargin; } }\r
+               }\r
+       }\r
+}\r
+#endif
\ No newline at end of file