Author: gert
Date: 2008-02-09 10:21:15 -0500 (Sat, 09 Feb 2008)
New Revision: 95339

Added:
   trunk/gert/standalone/bug358435/
   trunk/gert/standalone/bug358435/default.build
   trunk/gert/standalone/bug358435/test.cs
   trunk/gert/standalone/bug358435/web/
   trunk/gert/standalone/bug358435/web/Default.aspx
   trunk/gert/standalone/bug358435/web/Default.aspx.cs
   trunk/gert/standalone/bug358435/web/MasterPage.master
   trunk/gert/standalone/bug358435/web/MasterPage.master.cs
   trunk/gert/standalone/bug358435/web/MasterPage2.master
   trunk/gert/standalone/bug358435/web/MasterPage2.master.cs
Log:
Added test for bug #358435.


Added: trunk/gert/standalone/bug358435/default.build
===================================================================
--- trunk/gert/standalone/bug358435/default.build       2008-02-09 15:07:34 UTC 
(rev 95338)
+++ trunk/gert/standalone/bug358435/default.build       2008-02-09 15:21:15 UTC 
(rev 95339)
@@ -0,0 +1,48 @@
+<project name="bug358435" 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="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="compile" depends="init">
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="../../build/common/Assert.cs" />
+                               <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/bug358435/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug358435/test.cs
===================================================================
--- trunk/gert/standalone/bug358435/test.cs     2008-02-09 15:07:34 UTC (rev 
95338)
+++ trunk/gert/standalone/bug358435/test.cs     2008-02-09 15:21:15 UTC (rev 
95339)
@@ -0,0 +1,41 @@
+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/Default.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=\"ctl00_ctl00_head_Label1\">Test</span>") == -1) {
+                                       Console.WriteLine (result);
+                                       return 1;
+                               }
+                       }
+                       response.Close ();
+               } catch (WebException ex) {
+                       HttpWebResponse response = (HttpWebResponse) 
ex.Response;
+                       if (response != null) {
+                               using (StreamReader sr = new StreamReader 
(response.GetResponseStream ())) {
+                                       Console.WriteLine (sr.ReadToEnd ());
+                               }
+                       }
+                       return 1;
+               }
+
+               return 0;
+       }
+}


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

Added: trunk/gert/standalone/bug358435/web/Default.aspx
===================================================================
--- trunk/gert/standalone/bug358435/web/Default.aspx    2008-02-09 15:07:34 UTC 
(rev 95338)
+++ trunk/gert/standalone/bug358435/web/Default.aspx    2008-02-09 15:21:15 UTC 
(rev 95339)
@@ -0,0 +1,4 @@
+<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" 
AutoEventWireup="true"
+       CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
+
+<%-- Add content controls here --%>


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

Added: trunk/gert/standalone/bug358435/web/Default.aspx.cs
===================================================================
--- trunk/gert/standalone/bug358435/web/Default.aspx.cs 2008-02-09 15:07:34 UTC 
(rev 95338)
+++ trunk/gert/standalone/bug358435/web/Default.aspx.cs 2008-02-09 15:21:15 UTC 
(rev 95339)
@@ -0,0 +1,10 @@
+using System;
+using System.Web.UI;
+
+public partial class _Default : Page
+{
+       protected void Page_Load (object sender, EventArgs e)
+       {
+               ((MasterPage2) (this.Master)).MYLabel1 = "Test";
+       }
+}


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

Added: trunk/gert/standalone/bug358435/web/MasterPage.master
===================================================================
--- trunk/gert/standalone/bug358435/web/MasterPage.master       2008-02-09 
15:07:34 UTC (rev 95338)
+++ trunk/gert/standalone/bug358435/web/MasterPage.master       2008-02-09 
15:21:15 UTC (rev 95339)
@@ -0,0 +1,18 @@
+<%@ Master Language="C#" AutoEventWireup="true" 
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
+
+<!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>
+       <asp:ContentPlaceHolder ID="head" runat="server">
+       </asp:ContentPlaceHolder>
+</head>
+<body>
+       <form id="form1" runat="server">
+       <div>
+               <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
+               </asp:ContentPlaceHolder>
+       </div>
+       </form>
+</body>
+</html>


Property changes on: trunk/gert/standalone/bug358435/web/MasterPage.master
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug358435/web/MasterPage.master.cs
===================================================================
--- trunk/gert/standalone/bug358435/web/MasterPage.master.cs    2008-02-09 
15:07:34 UTC (rev 95338)
+++ trunk/gert/standalone/bug358435/web/MasterPage.master.cs    2008-02-09 
15:21:15 UTC (rev 95339)
@@ -0,0 +1,8 @@
+using System;
+
+public partial class MasterPage : System.Web.UI.MasterPage
+{
+       protected void Page_Load (object sender, EventArgs e)
+       {
+       }
+}


Property changes on: trunk/gert/standalone/bug358435/web/MasterPage.master.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug358435/web/MasterPage2.master
===================================================================
--- trunk/gert/standalone/bug358435/web/MasterPage2.master      2008-02-09 
15:07:34 UTC (rev 95338)
+++ trunk/gert/standalone/bug358435/web/MasterPage2.master      2008-02-09 
15:21:15 UTC (rev 95339)
@@ -0,0 +1,8 @@
+<%@ Master Language="C#" MasterPageFile="~/MasterPage.master" 
AutoEventWireup="false"
+       CodeFile="MasterPage2.master.cs" Inherits="MasterPage2" %>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
+       <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
+</asp:Content>
+<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" 
runat="Server">
+</asp:Content>


Property changes on: trunk/gert/standalone/bug358435/web/MasterPage2.master
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug358435/web/MasterPage2.master.cs
===================================================================
--- trunk/gert/standalone/bug358435/web/MasterPage2.master.cs   2008-02-09 
15:07:34 UTC (rev 95338)
+++ trunk/gert/standalone/bug358435/web/MasterPage2.master.cs   2008-02-09 
15:21:15 UTC (rev 95339)
@@ -0,0 +1,15 @@
+using System;
+using System.Web.UI;
+
+public partial class MasterPage2 : MasterPage
+{
+       protected void Page_Load (object sender, EventArgs e)
+       {
+       }
+
+       public string MYLabel1 {
+               set {
+                       Label1.Text = value;
+               }
+       }
+}


Property changes on: trunk/gert/standalone/bug358435/web/MasterPage2.master.cs
___________________________________________________________________
Name: svn:eol-style
   + native

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

Reply via email to