add a test for bug #76087.
authorChris Toshok <toshok@novell.com>
Tue, 13 Sep 2005 20:03:05 +0000 (20:03 -0000)
committerChris Toshok <toshok@novell.com>
Tue, 13 Sep 2005 20:03:05 +0000 (20:03 -0000)
svn path=/trunk/mcs/; revision=49978

mcs/class/System.Web/Test/jsunit-tests/customvalidator/nofunc.aspx [new file with mode: 0644]
mcs/class/System.Web/Test/jsunit-tests/index.html

diff --git a/mcs/class/System.Web/Test/jsunit-tests/customvalidator/nofunc.aspx b/mcs/class/System.Web/Test/jsunit-tests/customvalidator/nofunc.aspx
new file mode 100644 (file)
index 0000000..bdad285
--- /dev/null
@@ -0,0 +1,61 @@
+<%@ Page Language="C#" AutoEventWireup="True" %>
+ <html>
+ <head>
+       <script runat="server">
+       void ButtonClick(Object sender, EventArgs e)
+       {
+           if (Page.IsValid)
+           {
+               Label1.Text="Page is valid.";
+           }
+           else
+           {
+               Label1.Text="Page is not valid!!";
+           }
+       }
+       </script>
+ </head>
+
+<body>
+  <h3>test for bug #76087</h3>
+
+  <form runat="server">
+        <asp:TextBox id="TextBox1" 
+              runat="server"/>
+
+       <!-- a dynamic uplevel validator.  -->
+       <asp:CustomValidator id="CV_dynamic_uplevel"
+                ControlToValidate="TextBox1"
+               Display="dynamic"
+               runat="server"/>*</asp:CustomValidator>
+
+       <asp:Label id="Label1"
+           runat="server"/>
+
+       <asp:Button id="Submit" Text="Submit" OnClick="ButtonClick" runat="server"/>
+  </form>
+
+
+<script Language="JavaScript">
+    var TestFixture = {
+       CV_nofunc_pre: function () {
+           JSUnit_TestCausesPageLoad ();
+
+           var submit = JSUnit_GetElement ("Submit");
+
+           JSUnit_Click (submit)
+       },
+
+       CV_nofunc_post: function () {
+           JSUnit_BindElement ("Label1");
+
+           Assert.AreEqual ("Page is valid.", "JSUnit_GetElement ().innerHTML", "innerHTML");
+       }
+
+    };
+
+</script>
+
+</body>
+
+</html>
\ No newline at end of file
index e1cf5df43899f63e3d25c9e1726b9f9d411476af..a6671fc9eba9e82c3b37041f4d30c75cc1a98cae 100644 (file)
@@ -21,6 +21,7 @@
 
         { url:"customvalidator/properties.aspx" },
         { url:"customvalidator/submit.aspx" },
+        { url:"customvalidator/nofunc.aspx" },
        { url:"rangevalidator/properties.aspx" },
        { url:"rangevalidator/submit.aspx" },
        { url:"rangevalidator/disabled.aspx" },