- From: Arnold, Curt <Curt.Arnold@hyprotech.com>
- Date: Thu, 18 Oct 2001 11:47:13 -0600
- To: "'kfm-devel@lists.kde.org'" <kfm-devel@lists.kde.org>
- Cc: "'david@mandrakesoft.com'" <david@mandrakesoft.com>, "'www-dom-ts@w3.org'" <www-dom-ts@w3.org>
Sorry, the original message was written for an audience who knew the context that I'm going to provide in the next few paragraphs. The DOM tests are defined in a abstract XML psuedo-programming language (typically referred to DOMTSML) and transformed into code for various languages (Java and ECMAScript now, with Python, .NET, C++, and others anticipated). DOMTSML's testing elements are patterned after those available in the xUnit (JUnit, JSUnit. PyUnit, Nunit,...) family of test frameworks. Though HTML DOM and DOM L2+ tests are in process, the currently available tests exercise the DOM L1 Core on XML documents. The ECMAScript tests are run with Edward Hiatt's JSUnit (http://www.jsunit.net) framework which currently supports IE 5+, Netscape 6+ and Mozilla 0.9+. JSUnit does not recognize Konqueror and will report it as an unsupported browser. If someone familiar with JavaScript programming and Konqueror could take a look at modifying JSUnit to work with Konqueror that would be a first enabling step. The following process will run JSUnit's internal tests. If this works in Konqueror then we could proceed to enabling the DOM test suite to run. 1. Download jsunit.zip from http://www.jsunit.net 2. Unzip to a local directory 3. Load testRunner.html into the browser 4. Should have a URL schema and filename box to the left of the run button, browse to the tests directory beneath testRunner.html and select jsUnitTestSuite.html (or type tests/jsUnitTestSuite.html) 5. Press Run 6. The status section should show a green bar progressing and eventually status should be "Done", Run = 18, Errors = 0, Failures = 0 Once JSUnit is Konqueror friendly, then it on to the DOM tests. As mentioned previously, the DOM test suite is generated from an abstract definition so it isn't available from our CVS. If interested, I'll create a snapshot on my personal site. The DOM TS for EcmaScript makes available 200+ individual tests and a handful of suites. Each of these will have a .html like jsUnitTestSuite.html. All browser specific code is located in the previously mentioned DOMTestCase.js file which detect the browser running the tests (IE, Mozilla, Adobe SVG Viewer) and implements functions to load arbitrary XML documents and access the DOM implementation. The main is here is how do you load a XML document or access the implementation in Konqueror. In Mozilla, it is something like: var domimpl = document.implementation; var xmldoc = document.implementation.load("someuri"); The tests are written assumming synchronous parsing (the call to the load function in the test doesn't return until the document is loaded). Since Mozilla only supports asynchronous parsing, this is kludged by preloading several documents and putting up an alert to stall to allow the XML document to complete loading. MSXML can be explicitly set to synchronous parsing. Hope this provides sufficient background. Would appreciate any help that you could provide. Please cc either www-dom-ts@w3.org or me personally since I'm not subscribed to kfm-devel.
Received on Thursday, 18 October 2001 13:57:36 UTC