Author: gert
Date: 2007-12-27 11:12:33 -0500 (Thu, 27 Dec 2007)
New Revision: 91949

Added:
   trunk/gert/standalone/bug350755/
   trunk/gert/standalone/bug350755/default.build
   trunk/gert/standalone/bug350755/test.cs
   trunk/gert/standalone/bug350755/web/
   trunk/gert/standalone/bug350755/web/DropDownList.aspx
   trunk/gert/standalone/bug350755/web/DropDownList.aspx.cs
   trunk/gert/standalone/bug350755/web/FileUpload.aspx
   trunk/gert/standalone/bug350755/web/FileUpload.aspx.cs
Log:
Added test for bug #350755.


Added: trunk/gert/standalone/bug350755/default.build
===================================================================
--- trunk/gert/standalone/bug350755/default.build       2007-12-27 16:06:04 UTC 
(rev 91948)
+++ trunk/gert/standalone/bug350755/default.build       2007-12-27 16:12:33 UTC 
(rev 91949)
@@ -0,0 +1,57 @@
+<project name="bug350755" default="rebuild">
+       <include buildfile="../../build/common.build" />
+       
+       <target name="mono-2.0-init">
+               <property name="xsp.package" value="xsp-2" />
+       </target>
+
+       <target name="net-2.0-init">
+               <property name="xsp.package" value="xsp-2" />
+       </target>
+
+       <property name="frameworks" value="mono-2.0,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="web/bin/**" />
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="compile" depends="init">
+               <mkdir dir="web/bin" />
+               <csc target="library" define="${csc.defines}" 
output="web/bin/Mono.Web.Test.dll" warnaserror="true" warninglevel="4">
+                       <sources basedir="web">
+                               <include name="DropDownList.aspx.cs" />
+                       </sources>
+                       <references>
+                               <include name="System.Web.dll" />
+                       </references>
+               </csc>
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+                       <references>
+                               <include name="System.Web.dll" />
+                       </references>
+               </csc>
+       </target>
+
+       <target name="run-test" depends="compile">
+               <exec 
program="${pkg-config::get-variable(xsp.package,'Executable')}" managed="true" 
spawn="true" pidproperty="server.pid">
+                       <arg value="--root" />
+                       <arg dir="web" />
+                       <arg value="--port" />
+                       <arg value="8081" />
+               </exec>
+               <sleep milliseconds="1000" />
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}" />
+               <kill pid="${server.pid}" />
+               <sleep milliseconds="1000" />
+       </target>
+</project>


Property changes on: trunk/gert/standalone/bug350755/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug350755/test.cs
===================================================================
--- trunk/gert/standalone/bug350755/test.cs     2007-12-27 16:06:04 UTC (rev 
91948)
+++ trunk/gert/standalone/bug350755/test.cs     2007-12-27 16:12:33 UTC (rev 
91949)
@@ -0,0 +1,59 @@
+using System;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading;
+
+class Program
+{
+       static int Main ()
+       {
+               Thread.CurrentThread.CurrentCulture = 
CultureInfo.InvariantCulture;
+               Thread.CurrentThread.CurrentUICulture = 
CultureInfo.InvariantCulture;
+
+               HttpWebRequest request = (HttpWebRequest) WebRequest.Create 
("http://localhost:8081/DropDownList.aspx";);
+               request.Method = "GET";
+
+               try {
+                       HttpWebResponse response = (HttpWebResponse) 
request.GetResponse ();
+                       using (StreamReader sr = new StreamReader 
(response.GetResponseStream (), Encoding.UTF8, true)) {
+                               string result = sr.ReadToEnd ();
+                               if (result.IndexOf ("<span 
id=\"Label1\">OK</span>") == -1) {
+                                       Console.WriteLine (result);
+                                       return 1;
+                               }
+                       }
+                       response.Close ();
+               } catch (WebException ex) {
+                       if (ex.Response != null) {
+                               StreamReader sr = new StreamReader 
(ex.Response.GetResponseStream ());
+                               Console.WriteLine (sr.ReadToEnd ());
+                       }
+                       return 2;
+               }
+
+               request = (HttpWebRequest) WebRequest.Create 
("http://localhost:8081/FileUpload.aspx";);
+               request.Method = "GET";
+
+               try {
+                       HttpWebResponse response = (HttpWebResponse) 
request.GetResponse ();
+                       using (StreamReader sr = new StreamReader 
(response.GetResponseStream (), Encoding.UTF8, true)) {
+                               string result = sr.ReadToEnd ();
+                               if (result.IndexOf ("<span 
id=\"Label1\">OK</span>") == -1) {
+                                       Console.WriteLine (result);
+                                       return 3;
+                               }
+                       }
+                       response.Close ();
+               } catch (WebException ex) {
+                       if (ex.Response != null) {
+                               StreamReader sr = new StreamReader 
(ex.Response.GetResponseStream ());
+                               Console.WriteLine (sr.ReadToEnd ());
+                       }
+                       return 4;
+               }
+
+               return 0;
+       }
+}


Property changes on: trunk/gert/standalone/bug350755/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug350755/web/DropDownList.aspx
===================================================================
--- trunk/gert/standalone/bug350755/web/DropDownList.aspx       2007-12-27 
16:06:04 UTC (rev 91948)
+++ trunk/gert/standalone/bug350755/web/DropDownList.aspx       2007-12-27 
16:12:33 UTC (rev 91949)
@@ -0,0 +1,13 @@
+<%@ Page Language="C#" AutoEventWireup="true" 
Codebehind="DropDownList.aspx.cs" Inherits="DropDownList" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head runat="server">
+       <title>Untitled Page</title>
+</head>
+<body>
+       <form id="form1" runat="server">
+               <asp:Label ID="Label1" runat="server" />
+       </form>
+</body>
+</html>


Property changes on: trunk/gert/standalone/bug350755/web/DropDownList.aspx
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug350755/web/DropDownList.aspx.cs
===================================================================
--- trunk/gert/standalone/bug350755/web/DropDownList.aspx.cs    2007-12-27 
16:06:04 UTC (rev 91948)
+++ trunk/gert/standalone/bug350755/web/DropDownList.aspx.cs    2007-12-27 
16:12:33 UTC (rev 91949)
@@ -0,0 +1,19 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.HtmlControls;
+
+public class DropDownList : System.Web.UI.Page
+{
+       protected Label Label1;
+
+       protected void Page_Load (object sender, EventArgs e)
+       {
+               Label1.Text = "OK";
+       }
+}


Property changes on: trunk/gert/standalone/bug350755/web/DropDownList.aspx.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug350755/web/FileUpload.aspx
===================================================================
--- trunk/gert/standalone/bug350755/web/FileUpload.aspx 2007-12-27 16:06:04 UTC 
(rev 91948)
+++ trunk/gert/standalone/bug350755/web/FileUpload.aspx 2007-12-27 16:12:33 UTC 
(rev 91949)
@@ -0,0 +1,13 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload.aspx.cs" 
Inherits="FileUpload" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head runat="server">
+       <title>Untitled Page</title>
+</head>
+<body>
+       <form id="form1" runat="server">
+               <asp:Label ID="Label1" runat="server" />
+       </form>
+</body>
+</html>


Property changes on: trunk/gert/standalone/bug350755/web/FileUpload.aspx
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug350755/web/FileUpload.aspx.cs
===================================================================
--- trunk/gert/standalone/bug350755/web/FileUpload.aspx.cs      2007-12-27 
16:06:04 UTC (rev 91948)
+++ trunk/gert/standalone/bug350755/web/FileUpload.aspx.cs      2007-12-27 
16:12:33 UTC (rev 91949)
@@ -0,0 +1,18 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+public partial class FileUpload : System.Web.UI.Page
+{
+       protected void Page_Load (object sender, EventArgs e)
+       {
+               Label1.Text = "OK";
+       }
+}


Property changes on: trunk/gert/standalone/bug350755/web/FileUpload.aspx.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to