+2009-02-05 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx and
+ Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs
+
2009-01-27 Marek Habersack <mhabersack@novell.com>
* System.Web.dll.sources: added System.Web.Util/SearchPattern.cs
Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.aspx \
Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.master \
Test/mainsoft/NunitWebResources/MissingMasterFile.aspx \
- Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx
+ Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx \
+ Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx \
+ Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs
RESX_DIST = resources/TranslationResources.resx
ifeq (net_2_0, $(PROFILE))
+2009-02-05 Marek Habersack <mhabersack@novell.com>
+
+ * ControlTest.cs: added test for bug #471305
+
2009-01-21 Marek Habersack <mhabersack@novell.com>
* XhtmlTextWriterTest.cs: temporarily disabled the
Assert.AreEqual ("", result, "#01");
}
+ [Test] // Bug #471305
+ [Category ("NunitWeb")]
+ public void NoDoubleOnInitOnRemoveAdd ()
+ {
+#if VISUAL_STUDIO
+ WebTest.CopyResource (GetType (), "MonoTests.System.Web.UI.WebControls.Resources.NoDoubleOnInitOnRemoveAdd.aspx", "NoDoubleOnInitOnRemoveAdd.aspx");
+ WebTest.CopyResource (GetType (), "MonoTests.System.Web.UI.WebControls.Resources.NoDoubleOnInitOnRemoveAdd.aspx.cs", "NoDoubleOnInitOnRemoveAdd.aspx.cs");
+#else
+ WebTest.CopyResource (GetType (), "NoDoubleOnInitOnRemoveAdd.aspx", "NoDoubleOnInitOnRemoveAdd.aspx");
+ WebTest.CopyResource (GetType (), "NoDoubleOnInitOnRemoveAdd.aspx.cs", "NoDoubleOnInitOnRemoveAdd.aspx.cs");
+#endif
+ WebTest t = new WebTest ("NoDoubleOnInitOnRemoveAdd.aspx");
+ string html = t.Run ();
+
+ Assert.AreEqual (-1, html.IndexOf ("<span>label</span><span>label</span>"), "#A1");
+ }
+
#if NET_2_0
[Test]
[Category("NunitWeb")]
+2009-02-05 Marek Habersack <mhabersack@novell.com>
+
+ * NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx,
+ NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs: added
+
2008-12-23 Marek Habersack <mhabersack@novell.com>
* NunitWeb/Makefile (NunitWeb.dll): added NunitWeb/CustomSection.cs
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" Src="NoDoubleOnInitOnRemoveAdd.aspx.cs" Inherits="_Bug471305_Default" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Bug #471305</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+public partial class _Bug471305_Default : System.Web.UI.Page \r
+{\r
+ public class CustomControl : Control\r
+ {\r
+ protected override void OnInit(EventArgs e)\r
+ {\r
+ Label label = new Label();\r
+ label.Text = "label";\r
+ Controls.Add(label);\r
+\r
+ base.OnInit(e);\r
+ }\r
+ }\r
+\r
+ protected void Page_Load(object sender, EventArgs e)\r
+ {\r
+ CustomControl ctrl = new CustomControl();\r
+ Form.Controls.Add(ctrl);\r
+ Form.Controls.Remove(ctrl);\r
+ Form.Controls.Add(ctrl);\r
+ }\r
+}\r