2005-09-19 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Mon, 19 Sep 2005 18:12:27 +0000 (18:12 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Mon, 19 Sep 2005 18:12:27 +0000 (18:12 -0000)
* HtmlAnchorCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlAnchorTest.cs: RaisePostBackEvent now throws a NRE under 2.0 RC.
* HtmlButtonCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlContainerControlCas.cs: New. CAS unit tests.
* HtmlFormCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlFormTest.cs: Fixed rendering output under 2.0 RC.
* HtmlImageCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlInputButtonCas.cs: Added "normal" unit tests execution under
Deny Unrestricted.
* HtmlInputButtonTest.cs: Fixed attribute count for 2.0 RC.
* HtmlInputControlCas.cs: New. CAS unit tests.
* HtmlInputControlTest.cs: Fixed attribute count for 2.0 RC.
* HtmlInputCheckBoxCas.cs: Added "normal" unit tests execution under
Deny Unrestricted.
* HtmlInputCheckBoxTest.cs: Fixed attribute count for 2.0 RC (which is
now identical to 1.x results).
* HtmlInputFileCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlInputFileTest.cs: Fixed attribute count for 2.0 RC.
* HtmlInputHiddenCas.cs: Fixed attribute count for 2.0 RC.
* HtmlInputPasswordCas.cs: Added "normal" unit tests execution under
Deny Unrestricted.
* HtmlInputPasswordTest.cs: Adjusted tests as 2.0 RC removed the
ctor(string).
* HtmlInputRadioButtonCas.cs: Fixed attribute count for 2.0 RC.
* HtmlInputRadioButtonTest.cs: Added "normal" unit tests execution
under Deny Unrestricted.
* HtmlInputResetCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlInputResetTest.cs: Fixed attribute count for 2.0 RC.
* HtmlInputSubmitCas.cs: Added "normal" unit tests execution under
Deny Unrestricted.
* HtmlInputSubmitTest.cs: Fixed attribute count for 2.0 RC.
* HtmlInputTextCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlInputTextTest.cs: Fixed attribute count for 2.0 RC.
* HtmlLinkCas.cs: New. CAS unit tests.
* HtmlMetaCas.cs: New. CAS unit tests.
* HtmlMetaTest.cs: Fixed rendering for 2.0 RC (tag ending).
* HtmlSelectCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlTableCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlTableCellCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlTableRowCas.cs: Added "normal" unit tests execution under Deny
Unrestricted.
* HtmlTextAreaCas.cs: New. CAS unit tests.

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

35 files changed:
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/ChangeLog
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlAnchorCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlAnchorTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlButtonCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlContainerControlCas.cs [new file with mode: 0644]
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlImageCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlCas.cs [new file with mode: 0644]
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputFileCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputFileTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputHiddenCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs [new file with mode: 0644]
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs [new file with mode: 0644]
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlSelectCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTableCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTableCellCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTableRowCas.cs
mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs [new file with mode: 0644]

index beefef8309ac3f5094957461d845e49c03ede70c..99bd5749ca11ac0d0e9cfe7a2efbd704c4d8c6da 100644 (file)
@@ -1,3 +1,58 @@
+2005-09-19  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * HtmlAnchorCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlAnchorTest.cs: RaisePostBackEvent now throws a NRE under 2.0 RC.
+       * HtmlButtonCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlContainerControlCas.cs: New. CAS unit tests.
+       * HtmlFormCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlFormTest.cs: Fixed rendering output under 2.0 RC.
+       * HtmlImageCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlInputButtonCas.cs: Added "normal" unit tests execution under 
+       Deny Unrestricted.
+       * HtmlInputButtonTest.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputControlCas.cs: New. CAS unit tests.
+       * HtmlInputControlTest.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputCheckBoxCas.cs: Added "normal" unit tests execution under
+       Deny Unrestricted.
+       * HtmlInputCheckBoxTest.cs: Fixed attribute count for 2.0 RC (which is
+       now identical to 1.x results).
+       * HtmlInputFileCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlInputFileTest.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputHiddenCas.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputPasswordCas.cs: Added "normal" unit tests execution under 
+       Deny Unrestricted.
+       * HtmlInputPasswordTest.cs: Adjusted tests as 2.0 RC removed the 
+       ctor(string).
+       * HtmlInputRadioButtonCas.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputRadioButtonTest.cs: Added "normal" unit tests execution 
+       under Deny Unrestricted.
+       * HtmlInputResetCas.cs: Added "normal" unit tests execution under Deny
+       Unrestricted.
+       * HtmlInputResetTest.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputSubmitCas.cs: Added "normal" unit tests execution under 
+       Deny Unrestricted.
+       * HtmlInputSubmitTest.cs: Fixed attribute count for 2.0 RC.
+       * HtmlInputTextCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlInputTextTest.cs: Fixed attribute count for 2.0 RC.
+       * HtmlLinkCas.cs: New. CAS unit tests.
+       * HtmlMetaCas.cs: New. CAS unit tests.
+       * HtmlMetaTest.cs: Fixed rendering for 2.0 RC (tag ending).
+       * HtmlSelectCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlTableCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlTableCellCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlTableRowCas.cs: Added "normal" unit tests execution under Deny 
+       Unrestricted.
+       * HtmlTextAreaCas.cs: New. CAS unit tests.
+
 2005-09-13  Sebastien Pouliot  <sebastien@ximian.com>
 
        * HtmlInputTextTest.cs: Fix expected value for LoadPostData (in the 
index a5914c14fe2a1ed6b54078b70c1060ff8a761e91..eaa9b88afe6a0f39c26216c80ccd0fb912cb3099 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlAnchorCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlAnchorTest unit = new HtmlAnchorTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.Target ();
+                       unit.HRef ();
+                       unit.AbsoluteHRef ();
+                       unit.RenderAttributes ();
+#if ONLY_1_1
+                       // sadly this started to throw NRE in 2.0 RC
+                       unit.IPostBackEventHandler_RaisePostBackEvent ();
+#endif
+               }
+
                public override Type Type {
                        get { return typeof (HtmlAnchor); }
                }
index 36f5d4a455a47e141f39cac37f3e088072cd4016..672515de7b0d244eaf92c2a4fcdaa200cf9f469e 100644 (file)
@@ -161,6 +161,9 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                }
 
                [Test]
+#if NET_2_0
+               [ExpectedException (typeof (NullReferenceException))] // since 2.0 RC :-(
+#endif
                public void IPostBackEventHandler_RaisePostBackEvent ()
                {
                        TestHtmlAnchor a = new TestHtmlAnchor ();
@@ -181,6 +184,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                }
 #if NET_2_0
                [Test]
+               [ExpectedException (typeof (NullReferenceException))] // since 2.0 RC :-(
                public void RaisePostBackEvent ()
                {
                        TestHtmlAnchor a = new TestHtmlAnchor ();
index d997ceccffb1664f1cd2e9b61ee2d9e94da2a4a3..9063b7dcabed97e98788ab5ec1e637234af3dbc8 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlButtonCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlButtonTest unit = new HtmlButtonTest ();
+                       unit.Defaults ();
+                       unit.CleanProperties ();
+                       unit.ViewState ();
+                       unit.RenderAttributes ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlButton); }
                }
diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlContainerControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlContainerControlCas.cs
new file mode 100644 (file)
index 0000000..0f5621d
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// HtmlContainerControlCas.cs 
+//     - CAS unit tests for System.Web.UI.HtmlControls.HtmlContainerControl
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using NUnit.Framework;
+
+using System;
+using System.Security.Permissions;
+using System.Web.UI.HtmlControls;
+
+using MonoTests.System.Web.UI.HtmlControls;
+
+namespace MonoCasTests.System.Web.UI.HtmlControls {
+
+       [TestFixture]
+       [Category ("CAS")]
+       public class HtmlContainerControlCas {
+
+               // note: we do not inherit from AspNetHostingMinimal because
+               // HtmlContainerControl is an abstract class
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlContainerControlTest unit = new HtmlContainerControlTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.CleanProperties ();
+                       unit.Render ();
+               }
+       }
+}
index 20ab1ddc939f198b199371509fc548c5c590eeff..a70e129532561c55841d2f415986268fae53ba87 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlFormCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlFormTest unit = new HtmlFormTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.Attributes ();
+                       unit.ViewState ();
+                       unit.Name_InsideNaming ();
+                       unit.RenderChildren ();
+#if NET_2_0
+                       unit.ControlCollection ();
+#endif
+               }
+
                public override Type Type {
                        get { return typeof (HtmlForm); }
                }
index 868b89561da90b78d2431fe2c8de99c4c5d26a7c..45136bbd0ad003928bf3967bc80400231cd4ed39 100644 (file)
@@ -210,8 +210,11 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                        Page p = new Page();
                        FormPoker form = new FormPoker ();
                        form.Page = p;
-
+#if NET_2_0
+                       Assert.AreEqual ("\r\n<div>\r\n<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"\r\n__VIEWSTATE\" value=\"\" />\r\n</div>\r\n", form.RenderChildren (), "A1");
+#else
                        Assert.AreEqual ("\r\n<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"\" />", form.RenderChildren (), "A1");
+#endif
                }
 
 #if NET_2_0
index b7ecad734f008e92b34deec9473098e406b95cf3..a72de462f6e1e0fa8a609461b3661bd48d24ae32 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlImageCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlImageTest unit = new HtmlImageTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.Negative ();
+                       unit.RenderAttributes ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlImage); }
                }
index 2f20c4da1858d0e71a21509e14bd8c05d93b46ca..4518c8461a6528291738f14316b6e05cf0277c5d 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputButtonCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputButtonTest unit = new HtmlInputButtonTest ();
+                       unit.Defaults ();
+                       unit.CleanProperties ();
+                       unit.ViewState ();
+                       unit.RenderAttributes ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputButton); }
                }
index f8a444f0158697076fc7b09ded4b7e2a90c793fc..34357d1832cdb4b692982444e04e71affc70dd78 100644 (file)
@@ -117,7 +117,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
 #if NET_2_0
                        p.ValidationGroup = "VG";
 
-                       Assert.AreEqual (2, p.Attributes.Count, "A1");
+                       Assert.AreEqual (3, p.Attributes.Count, "A1");
 #else
                        Assert.AreEqual (2, p.Attributes.Count, "A1");
 #endif
index f40909fc7259bec72881ad68b42972a63028aaf8..6e43322df418a5e1a4402e4a5305016a47f90551 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputCheckBoxCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputCheckBoxTest unit = new HtmlInputCheckBoxTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.CleanProperties ();
+                       unit.Render ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputCheckBox); }
                }
index ba55cb29b9944eb81e2817996b1dba5d1cc71b06..7e7afdf3a8765f91e41e814e7eac77005caebdcd 100644 (file)
@@ -51,20 +51,12 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                public void DefaultProperties ()
                {
                        HtmlInputCheckBox c = new HtmlInputCheckBox ();
-                       
-#if NET_2_0
-                       Assert.AreEqual (0, c.Attributes.Count, "Attributes.Count");
-#else
+               
                        Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count");
-#endif
 
                        Assert.IsFalse (c.Checked, "Checked");
                        
-#if NET_2_0
-                       Assert.AreEqual (0, c.Attributes.Count, "Attributes.Count after");
-#else
                        Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count after");
-#endif
                }
 
                [Test]
@@ -72,20 +64,12 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                {
                        HtmlInputCheckBox c = new HtmlInputCheckBox ();
                        
-#if NET_2_0
-                       Assert.AreEqual (0, c.Attributes.Count, "Attributes.Count");
-#else
                        Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count");
-#endif
 
                        c.Checked = true;
                        Assert.IsTrue (c.Checked, "Checked");
                        
-#if NET_2_0
-                       Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count after");
-#else
                        Assert.AreEqual (2, c.Attributes.Count, "Attributes.Count after");
-#endif
                }
 
                [Test]
@@ -94,20 +78,10 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                        HtmlInputCheckBox c = new HtmlInputCheckBox ();
 
                        c.Checked = true;
-
-#if NET_2_0
-                       Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count");
-#else
                        Assert.AreEqual (2, c.Attributes.Count, "Attributes.Count");
-#endif
 
                        c.Checked = false;
-
-#if NET_2_0
-                       Assert.AreEqual (0, c.Attributes.Count, "Attributes.Count after");
-#else
                        Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count after");
-#endif
                }
 
                [Test]
diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlCas.cs
new file mode 100644 (file)
index 0000000..bbd44d0
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// HtmlInputControlCas.cs 
+//     - CAS unit tests for System.Web.UI.HtmlControls.HtmlInputControl
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using NUnit.Framework;
+
+using System;
+using System.Security.Permissions;
+using System.Web.UI.HtmlControls;
+
+using MonoTests.System.Web.UI.HtmlControls;
+
+namespace MonoCasTests.System.Web.UI.HtmlControls {
+
+       [TestFixture]
+       [Category ("CAS")]
+       public class HtmlInputControlCas {
+
+               // note: we do not inherit from AspNetHostingMinimal because
+               // HtmlInputControl is an abstract class
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputControlTest unit = new HtmlInputControlTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.CleanProperties ();
+                       unit.Name ();
+                       unit.Name_InsideNaming ();
+                       unit.IDversusValue ();
+                       unit.RenderAttributes ();
+                       unit.Constructor_Null ();
+                       unit.Password ();
+               }
+       }
+}
index 84086c83d194b54139ee4561905035b60f7a6e27..1fa9bc33f663bdf513bf262989d7d452946989ac 100644 (file)
@@ -75,12 +75,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
        [TestFixture]
        public class HtmlInputControlTest {
 
-#if NET_2_0
-               private const int defaultAttributesCount = 0;
-#else
-               // type is kept in Attributes under 1.x
                private const int defaultAttributesCount = 1;
-#endif
 
                [Test]
                public void DefaultProperties ()
index 67bc098c56d1f40d01171c930505822523e87881..83e853ce93f238544cdbd0c708dbe33c2563e5c9 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputFileCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputFileTest unit = new HtmlInputFileTest ();
+                       unit.Defaults ();
+                       unit.Attribute_Count ();
+                       unit.RenderAttributes ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputFile); }
                }
index c7e3799517d207adcf11e6a5ce30e6e0873f8696..4aeedd419ec0f2718f2b65f823f2aa351c8486d3 100644 (file)
@@ -98,11 +98,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                        p.MaxLength = 50;
                        p.Size = 20;
 
-#if NET_2_0
-                       Assert.AreEqual (3, p.Attributes.Count, "A1");
-#else
                        Assert.AreEqual (4, p.Attributes.Count, "A1");
-#endif
                }
 
 #if false
index 458dd856abeccf9bf18bc3291dd28e8026df0274..0855a3c2700f1e57e5c1a78823071dd238f7e3ea 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputHiddenCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputHiddenTest unit = new HtmlInputHiddenTest ();
+                       unit.Defaults ();
+                       unit.PropertiesNull ();
+                       unit.Postback ();
+                       unit.TestPostbackHandling ();
+                       unit.Render ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputHidden); }
                }
index cbf86c3a2a1115ebcdfe6fc7a6f41281b6cc5385..e30a207c7213a6064c8445dbf17a6995a6fc6310 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputPasswordCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputPasswordTest unit = new HtmlInputPasswordTest ();
+                       unit.DefaultProperties ();
+                       unit.RenderAttributes ();
+                       unit.IPostBackDataHandler_RaisePostBackEvent ();
+                       unit.IPostBackDataHandler_LoadPostData ();
+                       unit.RaisePostBackEvent ();
+                       unit.LoadPostData ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputPassword); }
                }
index 0adeefc6254aede6f4563d49f90e4c35a97e4110..aceef2d0eff45e1d91a471a5dde6444d3fde65e1 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NET_2_0
+
 using System;
 using System.Collections.Specialized;
 using System.IO;
@@ -35,7 +37,6 @@ using System.Web.UI.HtmlControls;
 
 using NUnit.Framework;
 
-#if NET_2_0
 namespace MonoTests.System.Web.UI.HtmlControls {
 
        public class TestHtmlInputPassword : HtmlInputPassword {
@@ -51,11 +52,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                {
                }
 
-               public TestHtmlInputPassword (string type)
-                       : base (type)
-               {
-               }
-
                public string RenderAttributes ()
                {
                        HtmlTextWriter writer = new HtmlTextWriter (new StringWriter ());
@@ -88,7 +84,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                public string AttributeNewValue {
                        get { return attr_new_value; }
                }
-#if NET_2_0
+
                public bool LoadPost (string key, NameValueCollection nvc)
                {
                        return base.LoadPostData (key, nvc);
@@ -98,20 +94,13 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                {
                        base.RaisePostDataChangedEvent ();
                }
-#endif
        }
 
 
        [TestFixture]
        public class HtmlInputPasswordTest {
-               private const int defaultAttributesCount = 0;
 
-               [Test]
-               public void ConstructorType ()
-               {
-                       HtmlInputPassword it = new HtmlInputPassword ("mono");
-                       Assert.AreEqual ("mono", it.Type, "Type");
-               }
+               private const int defaultAttributesCount = 1;
 
                [Test]
                public void DefaultProperties ()
index 3be743503261358bde7ad4725060a86d68d93192..05c88f3d8e15acce780c893f754cfed54017533c 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputRadioButtonCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputRadioButtonTest unit = new HtmlInputRadioButtonTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.CleanProperties ();
+                       unit.Value_Existing ();
+                       unit.Value_Resetting ();
+                       unit.Value_ResetNull ();
+                       unit.IDversusValue ();
+                       unit.IPostBackDataHandler_RaisePostBackEvent ();
+                       unit.IPostBackDataHandler_LoadPostData_WrongId ();
+                       unit.IPostBackDataHandler_LoadPostData ();
+#if NET_2_0
+                       unit.RaisePostBackEvent ();
+                       unit.LoadPostData_WrongId ();
+                       unit.LoadPostData ();
+#endif
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputRadioButton); }
                }
index bc7ee868a26bfc47068894ead44fb8a34576369b..ee66a3d9c9dd5fb1ca89fcd3f58c039a27d4bae0 100644 (file)
@@ -61,12 +61,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
        [TestFixture]
        public class HtmlInputRadioButtonTest {
 
-#if NET_2_0
-               private const int defaultAttributesCount = 0;
-#else
-               // type is kept in Attributes under 1.x
                private const int defaultAttributesCount = 1;
-#endif
 
                [Test]
                public void DefaultProperties ()
index b0fc2dae10a699a6d52aa97f2498cc8e8e594cac..ec34cf9ef3c517ea44ad53d3d6a0b41fdc93baf5 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputResetCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputResetTest unit = new HtmlInputResetTest ();
+                       unit.OverrideProperties ();
+                       unit.Defaults ();
+                       unit.CleanProperties ();
+                       unit.RenderAttributes ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputReset); }
                }
index a58df030a77fe95eca68878e29f11f553ca96d35..414a5f2076b48a1873040f19ae9c23898e2de0a0 100644 (file)
@@ -114,7 +114,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
 
                        HtmlInputResetPoker p = new HtmlInputResetPoker ();
 
-                       Assert.AreEqual (p.Attributes.Count, 0, "A1");
+                       Assert.AreEqual (p.Attributes.Count, 1, "A1");
 
                        p.DoRenderAttributes (tw);
                        Assert.AreEqual (sw.ToString (), " name type=\"reset\" /", "A2");
index 3c2052ea4e67638f0381a38b3425e56f5d0565c1..862a30f21a13db46ffb50a696655ffb9bd64afc4 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputSubmitCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputSubmitTest unit = new HtmlInputSubmitTest ();
+                       unit.Defaults ();
+                       unit.CleanProperties ();
+                       unit.RenderAttributes ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputSubmit); }
                }
index 2bc57d9017cdc2b1a0ebb84cb5cc99b475d95491..894f9ea1158f70445fd94f666423fde1723b53a4 100644 (file)
@@ -102,7 +102,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
 
                        HtmlInputSubmitPoker p = new HtmlInputSubmitPoker ();
 
-                       Assert.AreEqual (p.Attributes.Count, 0, "A1");
+                       Assert.AreEqual (p.Attributes.Count, 1, "A1");
 
                        p.DoRenderAttributes (tw);
                        Assert.AreEqual (sw.ToString (), " name type=\"submit\" /", "A2");
index 48578fadfca845ee4cbcec4f0bc032f54d3defdb..060e3c6ff1c04bdc63226a906281da7e26b19591 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlInputTextCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlInputTextTest unit = new HtmlInputTextTest ();
+                       unit.ConstructorType ();
+                       unit.DefaultProperties ();
+                       unit.CleanProperties ();
+                       unit.NullProperties ();
+                       unit.Password ();
+                       unit.RenderAttributes ();
+                       unit.RenderAttributes_Password ();
+                       unit.IPostBackDataHandler_RaisePostBackEvent ();
+                       unit.IPostBackDataHandler_LoadPostData ();
+#if NET_2_0
+                       unit.RaisePostBackEvent ();
+                       unit.LoadPostData ();
+#endif
+               }
+
                public override Type Type {
                        get { return typeof (HtmlInputText); }
                }
index b64faf728a07296adc3f5ce5ba6b18b16fa60d5b..afafbee7bd42ef8fa8b7a9bfce5819fc0fb8d4be 100644 (file)
@@ -103,12 +103,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
        [TestFixture]
        public class HtmlInputTextTest {
 
-#if NET_2_0
-               private const int defaultAttributesCount = 0;
-#else
-               // type is kept in Attributes under 1.x
                private const int defaultAttributesCount = 1;
-#endif
 
                [Test]
                public void ConstructorType ()
diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs
new file mode 100644 (file)
index 0000000..ec4314d
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// HtmlLinkCas.cs 
+//     - CAS unit tests for System.Web.UI.HtmlControls.HtmlLink
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using NUnit.Framework;
+
+using System;
+using System.Security.Permissions;
+using System.Web.UI.HtmlControls;
+
+using MonoTests.System.Web.UI.HtmlControls;
+
+namespace MonoCasTests.System.Web.UI.HtmlControls {
+
+       [TestFixture]
+       [Category ("CAS")]
+       public class HtmlLinkCas : AspNetHostingMinimal {
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlLinkTest unit = new HtmlLinkTest ();
+                       unit.Defaults ();
+                       unit.Setters ();
+                       unit.Render ();
+                       unit.Render_EmptyHref ();
+               }
+
+               public override Type Type {
+                       get { return typeof (HtmlLink); }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs
new file mode 100644 (file)
index 0000000..2f499e4
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// HtmlMetaCas.cs 
+//     - CAS unit tests for System.Web.UI.HtmlControls.HtmlMeta
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using NUnit.Framework;
+
+using System;
+using System.Security.Permissions;
+using System.Web.UI.HtmlControls;
+
+using MonoTests.System.Web.UI.HtmlControls;
+
+namespace MonoCasTests.System.Web.UI.HtmlControls {
+
+       [TestFixture]
+       [Category ("CAS")]
+       public class HtmlMetaCas : AspNetHostingMinimal {
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlMetaTest unit = new HtmlMetaTest ();
+                       unit.Defaults ();
+                       unit.Setters ();
+                       unit.Render ();
+                       unit.Render_Empty ();
+               }
+
+               public override Type Type {
+                       get { return typeof (HtmlMeta); }
+               }
+       }
+}
+
+#endif
index c7251ad4dd34499b090ccc9f3ee750189538a577..f6d6c929402e299d6955cfa655b38666aa5f2976 100644 (file)
@@ -87,14 +87,14 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                        meta.Content = "Content";
                        meta.HttpEquiv = "Equiv";
                        meta.Scheme = "Scheme";
-                       Assert.AreEqual ("<meta name=\"Name\" content=\"Content\" http-equiv=\"Equiv\" scheme=\"Scheme\">", meta.Render(), "A1");
+                       Assert.AreEqual ("<meta name=\"Name\" content=\"Content\" http-equiv=\"Equiv\" scheme=\"Scheme\" />", meta.Render(), "A1");
                }
 
                [Test]
                public void Render_Empty ()
                {
                        HtmlMetaPoker meta = new HtmlMetaPoker ();
-                       Assert.AreEqual ("<meta>", meta.Render(), "A1");
+                       Assert.AreEqual ("<meta />", meta.Render(), "A1");
                }
        }
 }
index be4dfcbd1f8876bf3ee3b3d13327308f0ec3fab7..a12fc984a4b5ba9a1494c0bc1ccedf7f57a5c351 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlSelectCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlSelectTest unit = new HtmlSelectTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.SourceType ();
+                       unit.ViewStateCount ();
+                       unit.InternalDetails ();
+                       unit.Multiple ();
+                       unit.Big ();
+                       unit.OneRowIndividual ();
+                       unit.RenderAttributes ();
+                       unit.DataBind1 ();
+                       unit.DataBind2 ();
+                       unit.DataBind3 ();
+                       unit.DataBindDoubleCall ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlSelect); }
                }
index fe27a93dee3d75c55ef7f009d77198c5b07e5554..7ff0b74401be3f6a105860c1f14762b2f523c4a3 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlTableCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlTableTest unit = new HtmlTableTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.EmptyProperties ();
+                       unit.CleanProperties ();
+                       unit.MaxInt32 ();
+                       unit.MinInt32 ();
+                       unit.WrongTypeInt ();
+                       unit.Render_Table_Simple ();
+                       unit.Render_Table ();
+                       unit.Render_TableRow_Simple ();
+                       unit.Render_TableRow ();
+                       unit.Render_TableRowCell_Simple ();
+                       unit.Render_TableRowCell ();
+                       unit.HtmlTableRowControlCollectionAdd ();
+                       unit.HtmlTableRowControlCollectionAddAt ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlTable); }
                }
index f239056a348833bbd5cfeb660b7cafd88dde6b2e..d9205be126bd34a971fe587278648b2e0107713c 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlTableCellCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlTableCellTest unit = new HtmlTableCellTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.EmptyProperties ();
+                       unit.CleanProperties ();
+                       unit.Render ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlTableCell); }
                }
index a72a034e24f6ddb3b4580a66bcf7a839ecf2418a..306963fbec7863f04c28790efae5a4863fd224a8 100644 (file)
 using NUnit.Framework;
 
 using System;
+using System.Security.Permissions;
 using System.Web.UI.HtmlControls;
 
+using MonoTests.System.Web.UI.HtmlControls;
+
 namespace MonoCasTests.System.Web.UI.HtmlControls {
 
        [TestFixture]
        [Category ("CAS")]
        public class HtmlTableRowCas : AspNetHostingMinimal {
 
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlTableRowTest unit = new HtmlTableRowTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.CleanProperties ();
+                       unit.Render ();
+                       unit.HtmlTableCellControlCollectionAdd ();
+                       unit.HtmlTableCellControlCollectionAddAt ();
+               }
+
                public override Type Type {
                        get { return typeof (HtmlTableRow); }
                }
diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs
new file mode 100644 (file)
index 0000000..1e7ff8a
--- /dev/null
@@ -0,0 +1,70 @@
+//
+// HtmlTextAreaCas.cs 
+//     - CAS unit tests for System.Web.UI.HtmlControls.HtmlTextArea
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using NUnit.Framework;
+
+using System;
+using System.Security.Permissions;
+using System.Web.UI.HtmlControls;
+
+using MonoTests.System.Web.UI.HtmlControls;
+
+namespace MonoCasTests.System.Web.UI.HtmlControls {
+
+       [TestFixture]
+       [Category ("CAS")]
+       public class HtmlTextAreaCas : AspNetHostingMinimal {
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void Deny_Unrestricted ()
+               {
+                       HtmlTextAreaTest unit = new HtmlTextAreaTest ();
+                       unit.DefaultProperties ();
+                       unit.NullProperties ();
+                       unit.CleanProperties ();
+                       unit.Name ();
+                       unit.Value ();
+                       unit.RenderAttributes ();
+                       unit.Render ();
+                       unit.AddParsedSubObject_LiteralControl ();
+                       unit.AddParsedSubObject_DataBoundLiteralControl ();
+                       unit.IPostBackDataHandler_RaisePostBackEvent ();
+                       unit.IPostBackDataHandler_LoadPostData ();
+#if NET_2_0
+                       unit.RaisePostBackEvent ();
+                       unit.LoadPostData ();
+#endif
+               }
+
+               public override Type Type {
+                       get { return typeof (HtmlTextArea); }
+               }
+       }
+}