2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 4 Oct 2005 07:35:16 +0000 (07:35 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 4 Oct 2005 07:35:16 +0000 (07:35 -0000)
* ListBoxTest.cs: the name is the UniqueID, not the ClientID.
* WebControlTest.cs: Attributes statebag is case insensitive.

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

mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxTest.cs
mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs

index a3cf49be0a1f1caf32fce50730435e8a1889478a..5b9f4543b0683609eedfca0bcd974780dee671f7 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * ListBoxTest.cs: the name is the UniqueID, not the ClientID.
+       * WebControlTest.cs: Attributes statebag is case insensitive.
+
 2005-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * ImageButtonTest.cs: test that 'name' attribute is rendered.
index f4aa4b3f9d085ad7e965ea88c9c727a38ff38452..7b9542221fdaad914b32638267aefb5d2c5a047f 100644 (file)
@@ -239,6 +239,22 @@ namespace MonoTests.System.Web.UI.WebControls
 #endif
                        Assert.AreEqual (exp, l.Render ());
                }
+
+               class MyNC : Control, INamingContainer {
+               }
+
+               [Test]
+               public void NameIsUniqueID ()
+               {
+                       ListBoxPoker list = new ListBoxPoker ();
+                       Page page = new Page ();
+                       page.ID = "pg";
+                       Control ctrl = new MyNC ();
+                       ctrl.ID = "ctrl";
+                       page.Controls.Add (ctrl);
+                       ctrl.Controls.Add (list);
+                       Assert.IsTrue (-1 != list.Render ().IndexOf (':'), "unique");
+               }
        }
 }
 
index d5addfdbe0d744446e4a8bcb74b474ef9d8c338c..e600017349a0136125804a36d2e6b6d1b499b847 100644 (file)
@@ -519,5 +519,14 @@ namespace MonoTests.System.Web.UI.WebControls
                        c.Load (o);
                        Assert.IsFalse (c.Enabled, "not enabled");
                }
+
+               [Test]
+               public void AttributeIsCaseInsensitive ()
+               {
+                       WebControlTestClass c = new WebControlTestClass ();
+                       c.Attributes ["hola"] = "hello";
+                       c.Attributes ["HOla"] = "hi";
+                       Assert.AreEqual ("hi", c.Attributes ["hoLA"], "#01");
+               }
        }
 }