+2005-09-29 Sebastien Pouliot <sebastien@ximian.com>
+
+ * HttpBrowserCapabilitiesCas.cs: Fixed tests case to work with both
+ values returned by Mono and MS runtimes.
+ * HttpContextCas.cs: Ignore the Application_Deny_UnmanagedCode test
+ case. This check was removed in 2.0 and seems to be inconsistent in
+ previous versions (i.e. depends on the execution order which triggers
+ the initialization of the HttpRuntime).
+
2005-09-23 Sebastien Pouliot <sebastien@ximian.com>
* HttpContextCas.cs: Mono throws ArgumentNullException for RewritePath
class BoolHttpBrowserCapabilities : HttpBrowserCapabilities {
public override string this [string key] {
- get { return "true"; }
+ get { return (key == "platform") ? "Win32" : "true"; }
}
}
public void TypeProperties_Deny_Unrestricted ()
{
HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities ();
- Assert.IsNull (cap.TagWriter, "TagWriter");
+ Type t = cap.TagWriter;
+ // note: right now the value is hardcoded in Mono, i.e. it doesn't come from the ini file
+ Assert.IsTrue (((t == null) || (t == typeof (HtmlTextWriter))), "TagWriter");
}
[Test]
[Test]
[SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
[ExpectedException (typeof (SecurityException))]
+ [Ignore ("occurs only in certain conditions - removed in 2.0")]
public void Application_Deny_UnmanagedCode ()
{
+ // The SecurityException doesn't always occurs (e.g. CAS unit tests
+ // works for HttpContextCas alone but will fail if the whole suit
+ // is executed). This is because the value is cached and may be
+ // created differently (without the check). This is _probably_ why
+ // this check has been removed in 2.0.
Assert.IsNotNull (context.Application, "Application");
}