Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2010-04-08 23:45:05 +0400
committerMarek Habersack <grendel@twistedcode.net>2010-04-08 23:45:05 +0400
commit66f913d5bcd995ad2ad0e4b440a93f4f722bc601 (patch)
tree896eccf30e78f36ea356873116a8472b461e4de0 /mcs
parentfe0cc67b091551dcf09d60671b9f4b81651afd5f (diff)
Backport of r155089
svn path=/branches/mono-2-6/mcs/; revision=155090
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Web/Makefile3
-rw-r--r--mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs18
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx17
3 files changed, 37 insertions, 1 deletions
diff --git a/mcs/class/System.Web/Makefile b/mcs/class/System.Web/Makefile
index 8109bc42bf0..1d7a2e93060 100644
--- a/mcs/class/System.Web/Makefile
+++ b/mcs/class/System.Web/Makefile
@@ -215,7 +215,8 @@ TEST_RESOURCE_FILES = \
Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx \
Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx \
Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx \
- Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx
+ Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx \
+ Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx
RESX_DIST = resources/TranslationResources.resx
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs
index 27817463966..2c8f4f1277e 100644
--- a/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs
@@ -41,11 +41,20 @@ using System.Web.Configuration;
using System.Web;
using System.Web.Security;
+using MonoTests.SystemWeb.Framework;
+using MonoTests.stand_alone.WebHarness;
+
namespace MonoTests.System.Web.Configuration {
[TestFixture]
public class GlobalizationSectionTest {
+ [TestFixtureSetUp]
+ public void SetUp ()
+ {
+ WebTest.CopyResource (GetType (), "GlobalizationEncodingName.aspx", "GlobalizationEncodingName.aspx");
+ }
+
[Test]
public void Defaults ()
{
@@ -161,6 +170,15 @@ namespace MonoTests.System.Web.Configuration {
mi.Invoke (s, parms);
}
+ [Test]
+ public void GlobalizationEncodingName ()
+ {
+ string pageHtml = new WebTest ("GlobalizationEncodingName.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = "GOOD";
+ Assert.AreEqual (originalHtml, renderedHtml, "#A1");
+ }
+
}
}
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx
new file mode 100644
index 00000000000..f8928ba37be
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx
@@ -0,0 +1,17 @@
+<%@ Page Language="C#" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
+<%@ Import Namespace="System.Web.Configuration" %>
+<!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>
+<body>
+<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><%
+ Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
+ GlobalizationSection configSection = (GlobalizationSection)config.GetSection("system.web/globalization");
+ configSection.RequestEncoding = Encoding.UTF7;
+ if (configSection.RequestEncoding == Encoding.UTF7)
+ Response.Write ("GOOD");
+ else
+ Response.Write ("BAD");
+%><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+</body>
+</html>