Author: gert
Date: 2007-07-18 13:18:59 -0400 (Wed, 18 Jul 2007)
New Revision: 82228
Added:
trunk/gert/standalone/bug82119/
trunk/gert/standalone/bug82119/default.build
trunk/gert/standalone/bug82119/test.cs
trunk/gert/standalone/bug82119/web/
trunk/gert/standalone/bug82119/web/Default.aspx
trunk/gert/standalone/bug82119/web/Default.aspx.cs
trunk/gert/standalone/bug82119/web/MasterPage.master
trunk/gert/standalone/bug82119/web/MasterPage.master.cs
Log:
Added test for bug #82119.
Added: trunk/gert/standalone/bug82119/default.build
===================================================================
--- trunk/gert/standalone/bug82119/default.build 2007-07-18 16:54:04 UTC
(rev 82227)
+++ trunk/gert/standalone/bug82119/default.build 2007-07-18 17:18:59 UTC
(rev 82228)
@@ -0,0 +1,54 @@
+<project name="bug82119" default="rebuild">
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </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="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <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" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/standalone/bug82119/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug82119/test.cs
===================================================================
--- trunk/gert/standalone/bug82119/test.cs 2007-07-18 16:54:04 UTC (rev
82227)
+++ trunk/gert/standalone/bug82119/test.cs 2007-07-18 17:18:59 UTC (rev
82228)
@@ -0,0 +1,45 @@
+using System;
+using System.IO;
+using System.Web;
+using System.Web.Hosting;
+
+class TinyHost : MarshalByRefObject
+{
+ static TinyHost CreateHost ()
+ {
+ string path = Path.Combine
(AppDomain.CurrentDomain.BaseDirectory, "web");
+ string bin = Path.Combine (path, "bin");
+ string asm = Path.GetFileName (typeof
(TinyHost).Assembly.Location);
+
+ Directory.CreateDirectory (bin);
+ File.Copy (asm, Path.Combine (bin, asm), true);
+
+ return (TinyHost) ApplicationHost.CreateApplicationHost (
+ typeof (TinyHost), "/", path);
+ }
+
+ public void Execute (string page, TextWriter tw)
+ {
+ SimpleWorkerRequest req = new SimpleWorkerRequest (
+ page, "", tw);
+ HttpRuntime.ProcessRequest (req);
+ }
+
+ static int Main ()
+ {
+ TinyHost h = CreateHost ();
+ StringWriter sw = new StringWriter ();
+ h.Execute ("Default.aspx", sw);
+ string result = sw.ToString ();
+ if (result.IndexOf ("<span
id=\"ctl00_ContentPlaceHolder1_label1\">hello</span>") == -1) {
+ Console.WriteLine (result);
+ return 2;
+ }
+ if (result.IndexOf ("<span
id=\"ctl00_ContentPlaceHolder1_label2\" disabled=\"disabled\">world</span>") ==
-1) {
+ Console.WriteLine (result);
+ return 3;
+ }
+
+ return 0;
+ }
+}
Property changes on: trunk/gert/standalone/bug82119/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug82119/web/Default.aspx
===================================================================
--- trunk/gert/standalone/bug82119/web/Default.aspx 2007-07-18 16:54:04 UTC
(rev 82227)
+++ trunk/gert/standalone/bug82119/web/Default.aspx 2007-07-18 17:18:59 UTC
(rev 82228)
@@ -0,0 +1,5 @@
+<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
Title="Untitled Page" %>
+<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
+ <asp:Label ID="label1" runat="server" Enabled="<%# true
%>">hello</asp:Label>
+ <asp:Label ID="label2" runat="server" Enabled="<%# false
%>">world</asp:Label>
+</asp:Content>
Property changes on: trunk/gert/standalone/bug82119/web/Default.aspx
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug82119/web/Default.aspx.cs
===================================================================
--- trunk/gert/standalone/bug82119/web/Default.aspx.cs 2007-07-18 16:54:04 UTC
(rev 82227)
+++ trunk/gert/standalone/bug82119/web/Default.aspx.cs 2007-07-18 17:18:59 UTC
(rev 82228)
@@ -0,0 +1,10 @@
+using System;
+using System.Web.UI;
+
+public partial class _Default : Page
+{
+ protected void Page_Load (object sender, EventArgs e)
+ {
+ DataBind ();
+ }
+}
Property changes on: trunk/gert/standalone/bug82119/web/Default.aspx.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug82119/web/MasterPage.master
===================================================================
--- trunk/gert/standalone/bug82119/web/MasterPage.master 2007-07-18
16:54:04 UTC (rev 82227)
+++ trunk/gert/standalone/bug82119/web/MasterPage.master 2007-07-18
17:18:59 UTC (rev 82228)
@@ -0,0 +1,17 @@
+<%@ 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>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <div>
+ <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
+ </asp:contentplaceholder>
+ </div>
+ </form>
+</body>
+</html>
Added: trunk/gert/standalone/bug82119/web/MasterPage.master.cs
===================================================================
--- trunk/gert/standalone/bug82119/web/MasterPage.master.cs 2007-07-18
16:54:04 UTC (rev 82227)
+++ trunk/gert/standalone/bug82119/web/MasterPage.master.cs 2007-07-18
17:18:59 UTC (rev 82228)
@@ -0,0 +1,9 @@
+using System;
+using System.Web.UI;
+
+public partial class _MasterPage : MasterPage
+{
+ protected void Page_Load (object sender, EventArgs e)
+ {
+ }
+}
Property changes on: trunk/gert/standalone/bug82119/web/MasterPage.master.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches