You've already forked linux-packaging-mono
Imported Upstream version 5.16.0.100
Former-commit-id: 38faa55fb9669e35e7d8448b15c25dc447f25767
This commit is contained in:
parent
0a9828183b
commit
7d7f676260
@@ -37,6 +37,7 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
using MonoTests.SystemWeb.Framework;
|
||||
using MonoTests.stand_alone.WebHarness;
|
||||
using System.Collections.Specialized;
|
||||
@@ -133,6 +134,7 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
WebTest.CopyResource (t, "CheckBoxList_Bug377703_2.aspx", "CheckBoxList_Bug377703_2.aspx");
|
||||
WebTest.CopyResource (t, "CheckBoxList_Bug578770.aspx", "CheckBoxList_Bug578770.aspx");
|
||||
WebTest.CopyResource (t, "CheckBoxList_Bug600415.aspx", "CheckBoxList_Bug600415.aspx");
|
||||
WebTest.CopyResource (t, "CheckBoxList_CustomValues.aspx", "CheckBoxList_CustomValues.aspx");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -155,6 +157,20 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
Assert.AreEqual (null, c.DoGetItemStyle (ListItemType.Item, 0), "GetItemStyle");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NunitWeb")]
|
||||
public void CheckBoxList_CustomValues(){
|
||||
WebTest t = new WebTest("CheckBoxList_CustomValues.aspx");
|
||||
string html = t.Run();
|
||||
FormRequest f = new FormRequest(t.Response, "form1");
|
||||
f.Controls.Add ("checkBoxList$1");
|
||||
f.Controls ["checkBoxList$1"].Value = "val2";
|
||||
t.Request = f;
|
||||
html = t.Run();
|
||||
Regex countchecked = new Regex("<input[^>]*checked=\"checked\"[^>]*>");
|
||||
Assert.AreEqual(1, countchecked.Matches(html).Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CheckBoxList_Bug377703_1 ()
|
||||
{
|
||||
@@ -169,8 +185,7 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
|
||||
FormRequest fr = new FormRequest (t.Response, "form1");
|
||||
fr.Controls.Add ("cbxl1$0");
|
||||
fr.Controls ["cbxl1$0"].Value = "on";
|
||||
|
||||
fr.Controls ["cbxl1$0"].Value = "x";
|
||||
fr.Controls.Add ("ctl01");
|
||||
fr.Controls ["ctl01"].Value = "Click me twice to have the first Item become empty";
|
||||
|
||||
@@ -179,8 +194,7 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
|
||||
fr = new FormRequest (t.Response, "form1");
|
||||
fr.Controls.Add ("cbxl1$0");
|
||||
fr.Controls ["cbxl1$0"].Value = "on";
|
||||
|
||||
fr.Controls ["cbxl1$0"].Value = "x";
|
||||
fr.Controls.Add ("ctl01");
|
||||
fr.Controls ["ctl01"].Value = "Click me twice to have the first Item become empty";
|
||||
|
||||
@@ -220,11 +234,9 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
|
||||
FormRequest fr = new FormRequest (t.Response, "form1");
|
||||
fr.Controls.Add ("cbxl2$0");
|
||||
fr.Controls ["cbxl2$0"].Value = "on";
|
||||
|
||||
fr.Controls ["cbxl2$0"].Value = "x";
|
||||
fr.Controls.Add ("cbxl2$2");
|
||||
fr.Controls ["cbxl2$2"].Value = "on";
|
||||
|
||||
fr.Controls ["cbxl2$2"].Value = "z";
|
||||
fr.Controls.Add ("ctl01");
|
||||
fr.Controls ["ctl01"].Value = "Click to toggle enable status above";
|
||||
|
||||
@@ -305,14 +317,13 @@ namespace MonoTests.System.Web.UI.WebControls {
|
||||
|
||||
fr = new FormRequest (t.Response, "form1");
|
||||
fr.Controls.Add ("checkBoxList$0");
|
||||
fr.Controls ["checkBoxList$0"].Value = "on";
|
||||
fr.Controls ["checkBoxList$0"].Value = "Item 1";
|
||||
fr.Controls.Add ("checkBoxList$1");
|
||||
fr.Controls ["checkBoxList$1"].Value = "on";
|
||||
fr.Controls ["checkBoxList$1"].Value = "Item 2";
|
||||
fr.Controls.Add ("checkBoxList$2");
|
||||
fr.Controls ["checkBoxList$2"].Value = "on";
|
||||
fr.Controls ["checkBoxList$2"].Value = "Item 3";
|
||||
fr.Controls.Add ("checkBoxList$3");
|
||||
fr.Controls ["checkBoxList$3"].Value = "on";
|
||||
|
||||
fr.Controls ["checkBoxList$3"].Value = "Item 4";
|
||||
t.Request = fr;
|
||||
html = t.Run ();
|
||||
listHtml = HtmlDiff.GetControlFromPageHtml (html);
|
||||
|
@@ -145,7 +145,7 @@ namespace MonoTests.System.Web.UI.WebControls
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(Exception))]
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void MalformatTest5 ()
|
||||
{
|
||||
WebColorConverter conv;
|
||||
|
@@ -75,7 +75,7 @@ namespace MonoTests.System.Web.UI
|
||||
Assert.AreEqual (0, cvt.ConvertFrom (null, null, String.Empty), "#A1-2");
|
||||
Assert.AreEqual (0, cvt.ConvertFrom (null, null, "infinite"), "#A1-3");
|
||||
Assert.AreEqual (0, cvt.ConvertFrom (null, null, "INfINiTE"), "#A1-4");
|
||||
Assert.Throws<Exception> (() => {
|
||||
Assert.Throws<ArgumentException> (() => {
|
||||
cvt.ConvertFrom (null, null, "dummy");
|
||||
}, "#A1-5");
|
||||
Assert.AreEqual (5, cvt.ConvertFrom (null, null, "5"), "#A1-6");
|
||||
|
@@ -0,0 +1,18 @@
|
||||
<%@ Page Language="C#" %>
|
||||
<!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>
|
||||
<title>Value attribute on items</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server" method="post">
|
||||
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %>
|
||||
<asp:CheckBoxList id="checkBoxList" runat="server">
|
||||
<asp:ListItem Value="val1" Selected="true">Text1</asp:ListItem>
|
||||
<asp:ListItem Value="val2">Text2</asp:ListItem>
|
||||
<asp:ListItem Value="val3" Selected="true">Text3</asp:ListItem>
|
||||
</asp:CheckBoxList>
|
||||
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user