2007-03-15 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Thu, 15 Mar 2007 14:45:22 +0000 (14:45 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Thu, 15 Mar 2007 14:45:22 +0000 (14:45 -0000)
* ImageButtonTest.cs, LinkButtonTest.cs: the validation tests in
the two cases were incorrect in my opinion. MS.NET renders the
same HTML (effectively) for no-validation case we do - there are
no onclick handlers or MyValidationGroup rendered for the
imagebutton/linkbutton controls.

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

mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs
mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonTest.cs

index 492b3a82f613ca183be313ef96738379f67c1521..261ebd0063d4ee008e96441715b8c989304abc2a 100644 (file)
@@ -1,3 +1,11 @@
+2007-03-15  Marek Habersack  <mhabersack@novell.com>
+
+       * ImageButtonTest.cs, LinkButtonTest.cs: the validation tests in
+       the two cases were incorrect in my opinion. MS.NET renders the
+       same HTML (effectively) for no-validation case we do - there are
+       no onclick handlers or MyValidationGroup rendered for the
+       imagebutton/linkbutton controls.
+
 2007-03-09  Marek Habersack  <mhabersack@novell.com>
 
        * LoginTest.cs: Added a test for case-insensitive command name in
index 68d67ef3c44688767a1056faf0a5fc047f61955e..f670113760be40f90f217b11f8aebad374fabf51 100644 (file)
@@ -206,10 +206,10 @@ namespace MonoTests.System.Web.UI.WebControls
                        WebTest t = new WebTest ("NoEventValidation.aspx");
                        t.Invoker = PageInvoker.CreateOnLoad (ValidationGroup_Load);
                        string html = HtmlDiff.GetControlFromPageHtml (t.Run ());
-                       if (html.IndexOf ("onclick") == -1)
-                               Assert.Fail ("Validation script not created");
-                       if (html.IndexOf ("MyValidationGroup") == -1)
-                               Assert.Fail ("Validation group not set fail");
+                       if (html.IndexOf ("onclick") != -1)
+                               Assert.Fail ("Validation script created");
+                       if (html.IndexOf ("MyValidationGroup") != -1)
+                               Assert.Fail ("Validation group set");
                }
 
                public static void ValidationGroup_Load(Page p)
index 15784b717fd22af422cf0bf9257352b96b2556ec..09e633e4b7cc898f4101eadae16dcd5a60ef73f3 100644 (file)
@@ -169,8 +169,8 @@ namespace MonoTests.System.Web.UI.WebControls
                        string html = HtmlDiff.GetControlFromPageHtml (t.Run ());
                        if (html.IndexOf ("href") == -1)
                                Assert.Fail ("Link button not created");
-                       if (html.IndexOf ("MyValidationGroup") == -1)
-                               Assert.Fail ("Validation group not set: " + html);
+                       if (html.IndexOf ("MyValidationGroup") != -1)
+                               Assert.Fail ("Validation group set: " + html);
                }
 
                public static void ValidationGroup_Load (Page p)