2006-11-20 Igor Zelmanovich <igorz@mainsoft.com>
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Mon, 20 Nov 2006 14:41:48 +0000 (14:41 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Mon, 20 Nov 2006 14:41:48 +0000 (14:41 -0000)
* ClientScriptManagerTest.cs: removed NotWorking attributes, fixed tests.

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

mcs/class/System.Web/Test/System.Web.UI/ChangeLog
mcs/class/System.Web/Test/System.Web.UI/ClientScriptManagerTest.cs

index ab52141bf153af189bd71bf182973c7d02fecc66..dd3d527521f163596316bd76f795e02201fac8cf 100644 (file)
@@ -1,3 +1,7 @@
+2006-11-20  Igor Zelmanovich   <igorz@mainsoft.com>
+
+       * ClientScriptManagerTest.cs: removed NotWorking attributes, fixed tests.
+
 2006-11-12  Igor Zelmanovich   <igorz@mainsoft.com>
 
        * LiteralControlTest.cs: added test.
index c4315e440b5cc4074ad8ee3470ed81f51f8112f8..d7d5bb036aa8a0ccbe8d092f4e3e19d48eb8b90f 100644 (file)
@@ -369,7 +369,7 @@ namespace MonoTests.System.Web.UI
 
                [Test]
                [Category ("NunitWeb")]
-               [Category ("NotWorking")]
+               [Category ("NotDotNet")] // for dot-net use __CALLBACKID insted __CALLBACKTARGET and __CALLBACKARGUMENT insted __CALLBACKPARAM
                public void ClientScriptManager_RegisterForEventValidation_1 ()
                {
                        WebTest t = new WebTest ("EventValidationTest1.aspx");
@@ -378,11 +378,11 @@ namespace MonoTests.System.Web.UI
                        FormRequest fr = new FormRequest (t.Response, "form1");
                        fr.Controls.Add ("__EVENTTARGET");
                        fr.Controls.Add ("__EVENTARGUMENT");
-                       fr.Controls.Add ("__CALLBACKID");
-                       fr.Controls.Add ("__CALLBACKPARAM");
+                       fr.Controls.Add ("__CALLBACKTARGET");
+                       fr.Controls.Add ("__CALLBACKARGUMENT");
                        fr.Controls["__EVENTTARGET"].Value = "";
                        fr.Controls["__EVENTARGUMENT"].Value = "";
-                       fr.Controls["__CALLBACKID"].Value = "__Page";
+                       fr.Controls ["__CALLBACKTARGET"].Value = "__Page";
                        t.Request = fr;
                        html = t.Run ();
 
@@ -392,7 +392,7 @@ namespace MonoTests.System.Web.UI
 
                [Test]
                [Category ("NunitWeb")]
-               [Category ("NotWorking")]
+               [Category ("NotDotNet")] // for dot-net use __CALLBACKID insted __CALLBACKTARGET and __CALLBACKPARAM insted __CALLBACKARGUMENT
                public void ClientScriptManager_RegisterForEventValidation_2 ()
                {
                        WebTest t = new WebTest ("EventValidationTest2.aspx");
@@ -401,11 +401,11 @@ namespace MonoTests.System.Web.UI
                        FormRequest fr = new FormRequest (t.Response, "form1");
                        fr.Controls.Add ("__EVENTTARGET");
                        fr.Controls.Add ("__EVENTARGUMENT");
-                       fr.Controls.Add ("__CALLBACKID");
-                       fr.Controls.Add ("__CALLBACKPARAM");
+                       fr.Controls.Add ("__CALLBACKTARGET");
+                       fr.Controls.Add ("__CALLBACKARGUMENT");
                        fr.Controls["__EVENTTARGET"].Value = "";
                        fr.Controls["__EVENTARGUMENT"].Value = "";
-                       fr.Controls["__CALLBACKID"].Value = "__Page";
+                       fr.Controls ["__CALLBACKTARGET"].Value = "__Page";
                        t.Request = fr;
                        html = t.Run ();
 
@@ -414,40 +414,34 @@ namespace MonoTests.System.Web.UI
                }
 
                // Expected Exceptions
-                               
+
                [Test]
-               [Category ("NotWorking")]
-               //[ExpectedException (typeof (InvalidOperationException))]
+               [ExpectedException (typeof (InvalidOperationException))]
                public void ClientScriptManager_RegisterForEventValidationException ()
                {
-               // TODO --> No RegisterForEventValidation Method        
-               //        Page p = new Page ();
-               //        ClientScriptManager cs = p.ClientScript;
-               //        cs.RegisterForEventValidation ("ID", "args");
+                       Page p = new Page ();
+                       ClientScriptManager cs = p.ClientScript;
+                       cs.RegisterForEventValidation ("ID", "args");
                }
 
                
                [Test]
-               [Category ("NotWorking")]
-               //[ExpectedException (typeof (ArgumentException))]
+               [ExpectedException (typeof (ArgumentException))]
                public void ClientScriptManager_ValidateEventException_1 ()
                {
-               // TODO --> No ValidateEvent Method
-               //        Page p = new Page ();
-               //        ClientScriptManager cs = p.ClientScript;
-               //        cs.ValidateEvent ("Exception");
+                       Page p = new Page ();
+                       ClientScriptManager cs = p.ClientScript;
+                       cs.ValidateEvent ("Exception");
                }
 
                
                [Test]
-               [Category ("NotWorking")]
-               //[ExpectedException (typeof (ArgumentException))]
+               [ExpectedException (typeof (ArgumentException))]
                public void ClientScriptManager_ValidateEventException_2 ()
                {
-               // TODO --> No ValidateEvent Method             
-               //        Page p = new Page ();
-               //        ClientScriptManager cs = p.ClientScript;
-               //        cs.ValidateEvent ("Exception", "args");
+                       Page p = new Page ();
+                       ClientScriptManager cs = p.ClientScript;
+                       cs.ValidateEvent ("Exception", "args");
                }