Przeglądaj źródła

* MdiFormTest.cs: Added tests for #81409.

svn path=/trunk/mcs/; revision=76199
Rolf Bjarne Kvinge 19 lat temu
rodzic
commit
9d6a8ca2fc

+ 4 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog

@@ -2,6 +2,10 @@
 
 	* MdiFormTest.cs: Added tests for #81409.
 
+2007-04-24  Rolf Bjarne Kvinge <[email protected]> 
+
+	* MdiFormTest.cs: Added tests for #81409.
+
 2007-04-24  Raja R Harinath  <[email protected]>
 
 	* BindingNavigatorTest.cs (CheckStandardItems): Avoid use of NUnit

+ 18 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs

@@ -58,6 +58,24 @@ namespace MonoTests.System.Windows.Forms
 			Thread.CurrentThread.CurrentCulture = _originalCulture;
 		}
 		
+		[Test]
+		public void ContextMenuTest ()
+		{
+			ComboBox cmb = new ComboBox ();
+			ContextMenu cm = new ContextMenu ();
+			
+			Assert.IsNull (cmb.ContextMenu, "#1");
+			cmb.ContextMenu = cm;
+			Assert.AreSame (cmb.ContextMenu, cm, "#2");
+			cmb.DropDownStyle = ComboBoxStyle.DropDown;
+			Assert.AreSame (cmb.ContextMenu, cm, "#3");
+			cmb.DropDownStyle = ComboBoxStyle.DropDownList;
+			Assert.AreSame (cmb.ContextMenu, cm, "#4");
+			cmb.DropDownStyle = ComboBoxStyle.Simple;
+			Assert.AreSame (cmb.ContextMenu, cm, "#5");
+			
+		}
+		
 		[Test] // bug 80794
 		public void DataBindingTest ()
 		{