You've already forked linux-packaging-mono
Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
@ -51,10 +51,6 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
unit.HRef ();
|
||||
unit.AbsoluteHRef ();
|
||||
unit.RenderAttributes ();
|
||||
#if ONLY_1_1
|
||||
// sadly this started to throw NRE in 2.0 RC
|
||||
unit.IPostBackEventHandler_RaisePostBackEvent ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public override Type Type {
|
||||
|
@ -45,12 +45,10 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
base.RenderAttributes (writer);
|
||||
return writer;
|
||||
}
|
||||
#if NET_2_0
|
||||
public void Raise ()
|
||||
{
|
||||
base.RaisePostBackEvent ("2.0");
|
||||
}
|
||||
#endif
|
||||
|
||||
public void TrakState () {
|
||||
TrackViewState();
|
||||
@ -292,9 +290,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if NET_2_0
|
||||
[ExpectedException (typeof (NullReferenceException))] // since 2.0 RC :-(
|
||||
#endif
|
||||
public void IPostBackEventHandler_RaisePostBackEvent ()
|
||||
{
|
||||
TestHtmlAnchor a = new TestHtmlAnchor ();
|
||||
@ -313,7 +309,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
HtmlTextWriter writer = a.GetWriter ();
|
||||
Assert.AreEqual (" href=\"http://127.0.0.1/\"", writer.InnerWriter.ToString (), "#01");
|
||||
}
|
||||
#if NET_2_0
|
||||
[Test]
|
||||
[ExpectedException (typeof (NullReferenceException))] // since 2.0 RC :-(
|
||||
public void RaisePostBackEvent ()
|
||||
@ -341,6 +336,5 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
Assert.AreEqual (false, copy.CausesValidation, "A1");
|
||||
Assert.AreEqual ("VG", copy.ValidationGroup, "A2");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -68,9 +68,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
HtmlButtonPoker p = new HtmlButtonPoker ();
|
||||
|
||||
Assert.IsTrue (p.CausesValidation, "A1");
|
||||
#if NET_2_0
|
||||
Assert.AreEqual ("", p.ValidationGroup, "A2");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -93,16 +91,12 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
{
|
||||
HtmlButtonPoker p = new HtmlButtonPoker ();
|
||||
p.CausesValidation = true;
|
||||
#if NET_2_0
|
||||
p.ValidationGroup = "VG";
|
||||
#endif
|
||||
object state = p.SaveState();
|
||||
|
||||
HtmlButtonPoker copy = new HtmlButtonPoker ();
|
||||
copy.LoadState (state);
|
||||
#if NET_2_0
|
||||
Assert.AreEqual ("VG", copy.ValidationGroup, "A1");
|
||||
#endif
|
||||
Assert.IsTrue (copy.CausesValidation, "A2");
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -46,4 +45,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -51,9 +51,7 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
unit.ViewState ();
|
||||
unit.Name_InsideNaming ();
|
||||
unit.RenderChildren ();
|
||||
#if NET_2_0
|
||||
unit.ControlCollection ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public override Type Type {
|
||||
|
@ -55,12 +55,10 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
public void SetContext ()
|
||||
{
|
||||
SetContext (Context);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class FormPoker : HtmlForm {
|
||||
@ -104,12 +102,10 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
|
||||
return sw.ToString ();
|
||||
}
|
||||
#if NET_2_0
|
||||
public ControlCollection GetControlCollection ()
|
||||
{
|
||||
return CreateControlCollection();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
class FUControl : UserControl {
|
||||
@ -131,9 +127,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
|
||||
Assert.AreEqual ("form", form.TagName, "TagName");
|
||||
|
||||
#if NET_2_0
|
||||
Assert.IsFalse (form.SubmitDisabledControls, "TagName");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -150,13 +144,11 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
form.Target = null;
|
||||
Assert.AreEqual (String.Empty, form.Target, "Target");
|
||||
|
||||
#if NET_2_0
|
||||
form.DefaultButton = null;
|
||||
Assert.AreEqual (String.Empty, form.DefaultButton, "DefaultButton");
|
||||
|
||||
form.DefaultFocus = null;
|
||||
Assert.AreEqual (String.Empty, form.DefaultFocus, "DefaultFocus");
|
||||
#endif
|
||||
Assert.AreEqual (0, form.Attributes.Count, "Attributes.Count");
|
||||
|
||||
}
|
||||
@ -167,7 +159,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
HtmlForm form = new HtmlForm ();
|
||||
IAttributeAccessor a = (IAttributeAccessor)form;
|
||||
|
||||
#if NET_2_0
|
||||
/* not stored in Attributes */
|
||||
form.DefaultButton = "defaultbutton";
|
||||
Assert.IsNull (a.GetAttribute ("defaultbutton"), "A1");
|
||||
@ -175,7 +166,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
/* not stored in Attributes */
|
||||
form.DefaultFocus = "defaultfocus";
|
||||
Assert.IsNull (a.GetAttribute ("defaultfocus"), "A2");
|
||||
#endif
|
||||
form.Enctype = "enctype";
|
||||
Assert.AreEqual ("enctype", a.GetAttribute ("enctype"), "A3");
|
||||
|
||||
@ -191,16 +181,13 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
form.ID = "hithere";
|
||||
Assert.AreEqual ("hithere", form.Name, "A9");
|
||||
|
||||
#if NET_2_0
|
||||
form.SubmitDisabledControls = true;
|
||||
Assert.IsNull (a.GetAttribute ("submitdisabledcontrols"), "A10");
|
||||
#endif
|
||||
|
||||
form.Target = "target";
|
||||
Assert.AreEqual ("target", a.GetAttribute ("target"), "A11");
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
#if !TARGET_DOTNET
|
||||
[Test]
|
||||
public void ActionStringWithQuery ()
|
||||
@ -238,7 +225,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
#endif
|
||||
Assert.AreEqual (" name=\"aspnetForm\" method=\"post\" action=\"someactionfile.aspx\"", attrs, "A2");
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void ViewState ()
|
||||
@ -246,18 +232,14 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
FormPoker form = new FormPoker();
|
||||
FormPoker copy = new FormPoker();
|
||||
|
||||
#if NET_2_0
|
||||
form.DefaultButton = "defaultbutton";
|
||||
form.DefaultFocus = "defaultfocus";
|
||||
#endif
|
||||
|
||||
object state = form.SaveState();
|
||||
copy.LoadState (state);
|
||||
|
||||
#if NET_2_0
|
||||
Assert.AreEqual ("", copy.DefaultButton, "A1");
|
||||
Assert.AreEqual ("defaultfocus", form.DefaultFocus, "A2");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@ -292,14 +274,9 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
Page p = new Page();
|
||||
FormPoker form = new FormPoker ();
|
||||
form.Page = p;
|
||||
#if NET_2_0
|
||||
HtmlDiff.AssertAreEqual ("<div>\r\n<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"\r\n__VIEWSTATE\" value=\"\" />\r\n</div>", form.RenderChildren ().Trim (), "A1");
|
||||
#else
|
||||
HtmlDiff.AssertAreEqual ("<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"\" />", form.RenderChildren ().Trim (), "A1");
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
[Test]
|
||||
public void ControlCollection ()
|
||||
{
|
||||
@ -309,6 +286,5 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
Assert.IsFalse (col.IsReadOnly, "A2");
|
||||
Assert.AreEqual (0, col.Count, "A3");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -46,4 +45,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -45,4 +44,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -102,18 +102,14 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
public void ViewState ()
|
||||
{
|
||||
HtmlInputButtonPoker p = new HtmlInputButtonPoker ();
|
||||
#if NET_2_0
|
||||
p.CausesValidation = false;
|
||||
p.ValidationGroup = "VG";
|
||||
#endif
|
||||
object s = p.SaveState();
|
||||
HtmlInputButtonPoker copy = new HtmlInputButtonPoker ();
|
||||
copy.LoadState (s);
|
||||
|
||||
#if NET_2_0
|
||||
Assert.IsFalse (copy.CausesValidation, "A1");
|
||||
Assert.AreEqual ("VG", p.ValidationGroup, "A2");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -127,22 +123,14 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
p.Page = new Page ();
|
||||
|
||||
p.CausesValidation = false;
|
||||
#if NET_2_0
|
||||
p.ValidationGroup = "VG";
|
||||
|
||||
Assert.AreEqual (3, p.Attributes.Count, "A1");
|
||||
#else
|
||||
Assert.AreEqual (2, p.Attributes.Count, "A1");
|
||||
#endif
|
||||
|
||||
tw.WriteBeginTag ("dummy");
|
||||
p.DoRenderAttributes (tw);
|
||||
tw.Write ('>');
|
||||
#if NET_2_0
|
||||
HtmlDiff.AssertAreEqual ("<dummy name type=\"button\" ValidationGroup=\"VG\" />", sw.ToString (), "A2");
|
||||
#else
|
||||
HtmlDiff.AssertAreEqual ("<dummy name type=\"button\" />", sw.ToString (), "A2");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -214,9 +202,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
public void RenderOnclick2 ()
|
||||
{
|
||||
Page page = new Page ();
|
||||
#if NET_2_0
|
||||
page.EnableEventValidation = false;
|
||||
#endif
|
||||
HtmlInputButtonPoker it = new HtmlInputButtonPoker ("button");
|
||||
page.Controls.Add (it);
|
||||
it.ID = "id1";
|
||||
@ -240,9 +226,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
public void RenderOnclick4 ()
|
||||
{
|
||||
Page page = new Page ();
|
||||
#if NET_2_0
|
||||
page.EnableEventValidation = false;
|
||||
#endif
|
||||
HtmlInputButtonPoker it = new HtmlInputButtonPoker ("submit");
|
||||
page.Controls.Add (it);
|
||||
it.ID = "id1";
|
||||
@ -257,9 +241,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
public void RenderOnclick5 ()
|
||||
{
|
||||
Page page = new Page ();
|
||||
#if NET_2_0
|
||||
page.EnableEventValidation = false;
|
||||
#endif
|
||||
RequiredFieldValidator val = new RequiredFieldValidator ();
|
||||
val.ControlToValidate = "id1";
|
||||
page.Validators.Add (val);
|
||||
|
@ -100,11 +100,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
c.Checked = true;
|
||||
s = c.Render ();
|
||||
|
||||
#if NET_2_0
|
||||
HtmlDiff.AssertAreEqual ("<input name=\"*1*\" id=\"*1*\" type=\"checkbox\" checked=\"checked\" />", s, "Render fail");
|
||||
#else
|
||||
HtmlDiff.AssertAreEqual ("<input name=\"*1*\" type=\"checkbox\" id=\"*1*\" checked=\"checked\" />", s, "Render fail");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,18 +106,14 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
public void ViewState ()
|
||||
{
|
||||
HtmlInputButtonPoker p = new HtmlInputButtonPoker ();
|
||||
#if NET_2_0
|
||||
p.CausesValidation = false;
|
||||
p.ValidationGroup = "VG";
|
||||
#endif
|
||||
object s = p.SaveState();
|
||||
HtmlInputButtonPoker copy = new HtmlInputButtonPoker ();
|
||||
copy.LoadState (s);
|
||||
|
||||
#if NET_2_0
|
||||
Assert.IsFalse (copy.CausesValidation, "A1");
|
||||
Assert.AreEqual ("VG", p.ValidationGroup, "A2");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -62,4 +61,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
@ -197,4 +196,3 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -56,11 +56,9 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
unit.IPostBackDataHandler_RaisePostBackEvent ();
|
||||
unit.IPostBackDataHandler_LoadPostData_WrongId ();
|
||||
unit.IPostBackDataHandler_LoadPostData ();
|
||||
#if NET_2_0
|
||||
unit.RaisePostBackEvent ();
|
||||
unit.LoadPostData_WrongId ();
|
||||
unit.LoadPostData ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public override Type Type {
|
||||
|
@ -45,7 +45,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
base.RenderAttributes (writer);
|
||||
return writer.InnerWriter.ToString ();
|
||||
}
|
||||
#if NET_2_0
|
||||
public bool LoadPost (string key, NameValueCollection nvc)
|
||||
{
|
||||
return base.LoadPostData (key, nvc);
|
||||
@ -55,7 +54,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
{
|
||||
base.RaisePostDataChangedEvent ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
@ -241,7 +239,6 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
Assert.IsTrue (attrs.IndexOf ("value=\"hola<&\"") >= 0);
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
[Test]
|
||||
public void RaisePostBackEvent ()
|
||||
{
|
||||
@ -293,6 +290,5 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
Assert.IsFalse (rb.LoadPost ("id1", nvc), "LoadPostData");
|
||||
Assert.AreEqual ("id1", rb.Value, "Value");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -60,4 +59,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -34,7 +34,6 @@ using System.Web.UI.HtmlControls;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
|
||||
@ -122,4 +121,3 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -59,4 +58,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -34,7 +34,6 @@ using System.Web.UI.HtmlControls;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
|
||||
@ -110,4 +109,3 @@ namespace MonoTests.System.Web.UI.HtmlControls {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -55,10 +55,8 @@ namespace MonoCasTests.System.Web.UI.HtmlControls {
|
||||
unit.RenderAttributes_Password ();
|
||||
unit.IPostBackDataHandler_RaisePostBackEvent ();
|
||||
unit.IPostBackDataHandler_LoadPostData ();
|
||||
#if NET_2_0
|
||||
unit.RaisePostBackEvent ();
|
||||
unit.LoadPostData ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public override Type Type {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user