Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -42,9 +42,7 @@ using MonoTests.SystemWeb.Framework;
using MonoTests.stand_alone.WebHarness;
using MonoTests.Common;
#if NET_2_0
using System.Web.UI.Adapters;
#endif
#if NET_4_0
using System.Web.Routing;
@ -232,7 +230,6 @@ namespace MonoTests.System.Web.UI
string uid1_3 = c1.UniqueID;
Assert.IsFalse (uid1_3 == uid1_2, "id was not reset");
#if NET_2_0
EnsureIDControl c3 = new EnsureIDControl ();
nc.Controls.Add (c3);
string uid3_1 = c3.UniqueID;
@ -243,7 +240,6 @@ namespace MonoTests.System.Web.UI
string uid3_2 = c3.UniqueID;
Assert.IsNull (c3.ID);
Assert.IsFalse (uid3_1 == uid3_2, "id was not reset");
#endif
}
[Test]
@ -258,11 +254,7 @@ namespace MonoTests.System.Web.UI
nc3.Controls.Add (nc2);
nc2.Controls.Add (nc);
nc.Controls.Add (control);
#if NET_2_0
string expected = "ctl00_ctl00_ctl00";
#else
string expected = "_ctl0__ctl0__ctl0";
#endif
Assert.AreEqual (expected, control.ClientID, "ClientID");
}
@ -292,7 +284,6 @@ namespace MonoTests.System.Web.UI
Assert.AreEqual (-1, html.IndexOf ("<span>label</span><span>label</span>"), "#A1");
}
#if NET_2_0
[Test]
[Category("NunitWeb")]
public void AppRelativeTemplateSourceDirectory ()
@ -916,7 +907,6 @@ namespace MonoTests.System.Web.UI
Assert.AreEqual (false, ctrl.EnableTheming, "EnableTheming#2");
}
#endif
[Test]
public void BindingContainer ()
{
@ -943,7 +933,6 @@ namespace MonoTests.System.Web.UI
Assert.IsTrue (Object.ReferenceEquals (child2.NamingContainer, nc), "NamingContainer #2");
Assert.IsTrue (Object.ReferenceEquals (child2.BindingContainer, nc), "BindingContainer #2");
#if NET_2_0
// DetailsViewPagerRow marked to be not BindingContainer
DetailsViewPagerRow row = new DetailsViewPagerRow (0, DataControlRowType.Pager, DataControlRowState.Normal);
TableCell cell = new TableCell ();
@ -954,16 +943,13 @@ namespace MonoTests.System.Web.UI
Assert.IsTrue (Object.ReferenceEquals (child3.NamingContainer, row), "NamingContainer #3");
Assert.IsTrue (Object.ReferenceEquals (child3.BindingContainer, control), "BindingContainer #3");
#endif
}
#if NET_2_0
[Test]
public void Control_Adapter ()
{
MyNC ctr = new MyNC ();
Assert.AreEqual (null, ctr.Adapter (), "Adapter");
}
#endif
[Test]
public void ChildControlsCreated () {
ChildControlsCreatedControl ctr = new ChildControlsCreatedControl ();
@ -975,7 +961,6 @@ namespace MonoTests.System.Web.UI
Assert.AreEqual (1, ctr.Controls.Count, "ChildControlsCreated#2");
}
#if NET_2_0
[Test (Description="Bug #594238")]
public void OverridenControlsPropertyAndPostBack_Bug594238 ()
{
@ -1013,7 +998,6 @@ namespace MonoTests.System.Web.UI
WebTest.CopyResource (GetType (), "OverridenControlsPropertyAndPostBack_Bug594238.aspx", "OverridenControlsPropertyAndPostBack_Bug594238.aspx");
}
#endif
#if NET_4_0
[Test]
public void GetRouteUrl_Object ()
@ -1134,7 +1118,6 @@ namespace MonoTests.System.Web.UI
}
#endif
#region helpcalsses
#if NET_2_0
class ControlWithState : Control
{
string _state;
@ -1187,10 +1170,8 @@ namespace MonoTests.System.Web.UI
}
}
#endif
class MyNC : Control, INamingContainer
{
#if NET_2_0
public ControlAdapter Adapter ()
{
return base.Adapter;
@ -1215,7 +1196,6 @@ namespace MonoTests.System.Web.UI
{
return base.HasEvents ();
}
#endif
}
class DerivedControl : Control
@ -1232,7 +1212,6 @@ namespace MonoTests.System.Web.UI
get { return coll; }
}
#if NET_2_0
public bool DoIsViewStateEnabled
{
get { return IsViewStateEnabled; }
@ -1257,7 +1236,6 @@ namespace MonoTests.System.Web.UI
{
return base.ResolveAdapter ();
}
#endif
}
class NamingContainer : Control, INamingContainer
@ -1293,7 +1271,6 @@ namespace MonoTests.System.Web.UI
#endregion
}
#if NET_2_0
public class Customadaptercontrol : Control
{
public new ControlAdapter Adapter {
@ -1315,7 +1292,6 @@ namespace MonoTests.System.Web.UI
EnsureID ();
}
}
#endif
public class ChildControlsCreatedControl : Control
{