[Mono-bugs] [Bug 64329][Nor] New - Problems with NUnitAsp on System.Xml.XhtmlDocument
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 27 Aug 2004 10:04:49 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kovymail@centrum.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=64329
--- shadow/64329 2004-08-27 10:04:49.000000000 -0400
+++ shadow/64329.tmp.9978 2004-08-27 10:04:49.000000000 -0400
@@ -0,0 +1,155 @@
+Bug#: 64329
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Debian sarge/sid
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: kovymail@centrum.cz
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Problems with NUnitAsp on System.Xml.XhtmlDocument
+
+When I use NUnitASP (I tried 1.4.1 binary/1.4.1 compiled by
+Mono/NUnitAsp from CVS 25.8.2004 compiled by Mono) and create simple
+test (also other tests failed):
+using NUnit.Framework;
+using NUnit.Extensions.Asp;
+using NUnit.Extensions.Asp.AspTester;
+
+namespace obchodTest
+{
+[TestFixture]
+public class editZboziTest : WebFormTestCase
+{
+[Test]
+public void TestPristup()
+{
+Browser.GetPage("http://www.centron.cz/ObchodPage.aspx");
+TextBoxTester TUzivatelskeJmeno =
+ new TextBoxTester("TJmeno", CurrentWebForm);
+TextBoxTester THeslo =
+ new TextBoxTester("THeslo", CurrentWebForm);
+AssertVisibility(THeslo,true);
+}
+}
+}
+
+compile it and run it:
+michal@michal:~/MonoDevelopProjects/obchodTest/bin/Debug$ nunit-
+console obchodTest.dll
+NUnit version 2.1.91
+Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei
+A. Vorontsov, Charlie Poole.
+Copyright (C) 2000-2003 Philip Craig.
+All Rights Reserved.
+
+OS Version: Unix 2.4.26.1 Mono Version: 1.1.4322.573
+
+.F.
+Tests run: 2, Failures: 1, Not run: 0, Time: 2,107178 seconds
+
+Failures:
+1) obchodTest.editZboziTest.TestPristup : System.
+NullReferenceException : Unexpected node type EndElement.
+in <0x0079c> System.Xml.XmlDocument:ReadNode (System.Xml.
+XmlReader)
+in <0x002b7> System.Xml.XmlDocument:ReadNode (System.Xml.
+XmlReader)
+in <0x002b7> System.Xml.XmlDocument:ReadNode (System.Xml.
+XmlReader)
+in <0x0004f> System.Xml.XmlDocument:Load (System.Xml.
+XmlReader)
+in <0x00075> XhtmlDocument:Load (System.Xml.XmlReader)
+in <0x00150> NUnit.Extensions.Asp.WebPage:ParsePageText ()
+in <0x00018> NUnit.Extensions.Asp.WebPage:get_Document ()
+in <0x0003d> NUnit.Extensions.Asp.HttpClient:get_CurrentPage ()
+in <0x00027> NUnit.Extensions.Asp.WebForm:get_Tag ()
+in <0x00012> NUnit.Extensions.Asp.WebForm:get_AspId ()
+in <0x0000f> NUnit.Extensions.Asp.WebForm:get_Description ()
+in <0x00038> NUnit.Extensions.Asp.ControlTester:get_Description ()
+in <0x000a0> NUnit.Extensions.Asp.WebAssertion:AssertVisibility
+(NUnit.Extensions.Asp.ControlTester,bool)
+in <0x000af> obchodTest.editZboziTest:TestPristup ()
+in (unmanaged) (wrapper managed-to-native) System.Reflection.
+MonoMethod:InternalInvoke (object,object[])
+in <0x00004> (wrapper managed-to-native) System.Reflection.
+MonoMethod:InternalInvoke (object,object[])
+in <0x00097> System.Reflection.MonoMethod:Invoke (object,System.
+Reflection.BindingFlags,System.Reflection.Binder,object[],System.
+Globalization.CultureInfo)
+
+
+NUnitAsp is also inside xsp-1.0.1.tar.gz source of Mono (i also tried
+this version of NUnitAsp). This bug appears also on some sample tests
+which are inside this source for testing xsp server.
+
+I show you also NUnit.Extensions.Asp.WebPage:ParsePageText:
+private void ParsePageText()
+ {
+ SgmlReader reader = new SgmlReader();
+ try
+ {
+ reader.InputStream = new
+StringReader(pageText);
+ reader.Dtd = ParseDtd(reader.NameTable);
+ reader.ErrorLog = Console.Error;
+ reader.DocType = "HTML";
+
+ document = new XhtmlDocument(reader.
+NameTable);
+ try
+ {
+ document.Load(reader);
+ }
+ catch (WebException e)
+ {
+ throw new DoctypeDtdException(e);
+ }
+
+ ParseInitialFormValues();
+ }
+ catch (XmlException e)
+ {
+ Console.WriteLine("vvvvvv The following
+HTML could not be parsed
+by NUnitAsp vvvvvv");
+ Console.WriteLine(pageText);
+ Console.WriteLine("^^^^^^ The preceding
+HTML could not be parsed
+by NUnitAsp ^^^^^^");
+ throw new ParseException("Could not parse
+HTML. See standard out
+ for the HTML and use a validator (such as the one at validator.w3.org) to
+troubleshoot. Parser
+error was: " + e.Message);
+ }
+ finally
+ {
+ reader.Close();
+ }
+ }
+
+
+
+-- System Information:
+Debian Release: 3.1
+ APT prefers testing
+ APT policy: (900, 'testing'), (600, 'unstable')
+Architecture: i386 (i686)
+Kernel: Linux 2.4.26-1-k7
+Locale: LANG=cs_CZ, LC_CTYPE=cs_CZ
+
+Versions of packages mono depends on:
+ii mono-assemblies-arch 1.0.1-1 architecture specific files
+for Mo
+ii mono-jit 1.0.1-1 fast CLI (.NET/Mono) JIT
+compiler
+ii mono-mcs 1.0.1-1 the Mono C# compiler
+ii mono-utils 1.0.1-1 Mono utilities