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/class
diff options
context:
space:
mode:
authorEgor Bogatov <egorbo@gmail.com>2017-11-19 15:43:06 +0300
committerMarek Safar <marek.safar@gmail.com>2017-11-19 15:43:06 +0300
commitb44333823da53df777fa53def4fcd2de8a9b131f (patch)
tree6978ec33e660245e39c661cdf4aadeed028c50ce /mcs/class
parentf1a22f31a76ea29624f7b6b682e572858e708d91 (diff)
XmlReaderSettings.EnableLegacyXmlSettings should always be false on mono. Fixes bug-60621 (#6014)
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs19
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs21
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs19
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs12
-rw-r--r--mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs2
-rw-r--r--mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs3
-rw-r--r--mcs/class/corlib/ReferenceSources/BinaryCompatibility.cs2
7 files changed, 48 insertions, 30 deletions
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs
index 6e04748f906..0e660e75068 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs
@@ -245,16 +245,17 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual (C14NSpecExample4Output, res, "Example 4 from c14n spec - Character Modifications and Character References (without comments)");
}
- [Test]
- public void C14NSpecExample5 ()
- {
- using (StreamWriter sw = new StreamWriter ("world.txt", false, Encoding.ASCII)) {
- sw.Write ("world");
- sw.Close ();
+ [Test]
+ [Ignore(".NET DOM implementation does not match W3C DOM specification.")]
+ public void C14NSpecExample5 ()
+ {
+ using (StreamWriter sw = new StreamWriter ("world.txt", false, Encoding.ASCII)) {
+ sw.Write ("world");
+ sw.Close ();
+ }
+ string res = ExecuteXmlDSigC14NTransform (C14NSpecExample5Input);
+ Assert.AreEqual (C14NSpecExample5Output, res, "Example 5 from c14n spec - Entity References (without comments)");
}
- string res = ExecuteXmlDSigC14NTransform (C14NSpecExample5Input);
- Assert.AreEqual (C14NSpecExample5Output, res, "Example 5 from c14n spec - Entity References (without comments)");
- }
[Test]
public void C14NSpecExample6 ()
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs
index 2eea71d0ce4..a6530464d10 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs
@@ -160,18 +160,19 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual (C14NSpecExample4Output, res, "Example 4 from c14n spec - Character Modifications and Character References (with comments)");
}
- [Test]
- public void C14NSpecExample5 ()
- {
- if (!File.Exists ("world.txt")) {
- using (StreamWriter sw = new StreamWriter ("world.txt", false, Encoding.ASCII)) {
- sw.Write ("world");
- sw.Close ();
+ [Test]
+ [Ignore(".NET DOM implementation does not match W3C DOM specification.")]
+ public void C14NSpecExample5 ()
+ {
+ if (!File.Exists ("world.txt")) {
+ using (StreamWriter sw = new StreamWriter ("world.txt", false, Encoding.ASCII)) {
+ sw.Write ("world");
+ sw.Close ();
+ }
}
+ string res = ExecuteXmlDSigC14NTransform (C14NSpecExample5Input, false);
+ Assert.AreEqual (C14NSpecExample5Output, res, "Example 5 from c14n spec - Entity References (with comments)");
}
- string res = ExecuteXmlDSigC14NTransform (C14NSpecExample5Input, false);
- Assert.AreEqual (C14NSpecExample5Output, res, "Example 5 from c14n spec - Entity References (with comments)");
- }
[Test]
public void C14NSpecExample6 ()
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs
index 69e38cf8178..25db0267ad6 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs
@@ -339,16 +339,17 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual (ExcC14NSpecExample4Output, res, "Example 4 from c14n spec - Character Modifications and Character References (without comments)");
}
- [Test]
- public void ExcC14NSpecExample5 ()
- {
- using (StreamWriter sw = new StreamWriter ("world.txt", false, Encoding.ASCII)) {
- sw.Write ("world");
- sw.Close ();
+ [Test]
+ [Ignore(".NET DOM implementation does not match W3C DOM specification.")]
+ public void ExcC14NSpecExample5 ()
+ {
+ using (StreamWriter sw = new StreamWriter ("world.txt", false, Encoding.ASCII)) {
+ sw.Write ("world");
+ sw.Close ();
+ }
+ string res = ExecuteXmlDSigExcC14NTransform (ExcC14NSpecExample5Input);
+ Assert.AreEqual (ExcC14NSpecExample5Output, res, "Example 5 from c14n spec - Entity References (without comments)");
}
- string res = ExecuteXmlDSigExcC14NTransform (ExcC14NSpecExample5Input);
- Assert.AreEqual (ExcC14NSpecExample5Output, res, "Example 5 from c14n spec - Entity References (without comments)");
- }
[Test]
public void ExcC14NSpecExample6 ()
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs
index 768cd5671da..2b20f06e971 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs
@@ -14,7 +14,7 @@ using System.Text;
using System.Xml;
using System.Xml.Schema;
using NUnit.Framework;
-
+using System.Reflection;
using ValidationFlags = System.Xml.Schema.XmlSchemaValidationFlags;
using AssertType = NUnit.Framework.Assert;
@@ -443,5 +443,15 @@ namespace MonoTests.System.Xml
var r2 = XmlReader.Create (r, c);
Assert.IsTrue (r2.Settings.Async);
}
+
+ [Test]
+ public void LegacyXmlSettingsAreDisabled ()
+ {
+ // Make sure LegacyXmlSettings are always disabled on Mono
+ // https://bugzilla.xamarin.com/show_bug.cgi?id=60621
+ var enableLegacyXmlSettingsMethod = typeof(XmlReaderSettings).GetMethod ("EnableLegacyXmlSettings",
+ BindingFlags.NonPublic | BindingFlags.Static);
+ Assert.IsFalse ((bool) enableLegacyXmlSettingsMethod.Invoke (null, null));
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs
index 78fef4a73ee..27313d0c8af 100644
--- a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs
+++ b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs
@@ -482,6 +482,7 @@ namespace nist_dom.fundamental
//----------------------------------------------------------------------------
[Test]
+ [Ignore(".NET DOM implementation does not match W3C DOM specification.")]
public void core0009A()
{
string computedValue = "";//0;
@@ -595,6 +596,7 @@ namespace nist_dom.fundamental
//----------------------------------------------------------------------------
[Test]
+ [Ignore(".NET DOM implementation does not match W3C DOM specification.")]
public void core0011A()
{
string computedValue = "";//"";
diff --git a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs
index eb4b3ddb71c..5f415070f42 100644
--- a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs
+++ b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs
@@ -453,7 +453,8 @@ namespace nist_dom.fundamental
//----------------------------------------------------------------------------
[Test]
- public void core0008M()
+ [Ignore(".NET DOM implementation does not match W3C DOM specification.")]
+ public void core0008M()
{
string computedValue = "";
string expectedValue = "False";
diff --git a/mcs/class/corlib/ReferenceSources/BinaryCompatibility.cs b/mcs/class/corlib/ReferenceSources/BinaryCompatibility.cs
index 77351195ca9..746d3783dc7 100644
--- a/mcs/class/corlib/ReferenceSources/BinaryCompatibility.cs
+++ b/mcs/class/corlib/ReferenceSources/BinaryCompatibility.cs
@@ -4,5 +4,7 @@ namespace System.Runtime.Versioning
{
public static readonly bool TargetsAtLeast_Desktop_V4_5 = true;
public static readonly bool TargetsAtLeast_Desktop_V4_5_1 = true;
+ // should be a property for System.Xml.BinaryCompatibility
+ public static bool TargetsAtLeast_Desktop_V4_5_2 => true;
}
} \ No newline at end of file