W3C home > Mailing lists > Public > www-dom-ts@w3.org > January 2003

RE: DOMOutputStream

From: Curt Arnold <carnold@houston.rr.com>
Date: Sun, 26 Jan 2003 23:40:37 -0600
Message-ID: <001601c2c5c6$9f0d7150$9700a8c0@curtkds>
To: <www-dom-ts@w3.org>
For the events tests, I designed an instrumented EventHandler called an EventMonitor that was implemented by the testing framework and captured all raised events and allowed the test to make assertions about the number of bubbling events, the properties of the second captured event.  Simple EventHandler's could have been implemented in DOM TS language, however adding the EventMonitor to the framework simplified the tests and kept DOM TS a simpler language.

For the load/save tests, I always expected that we would need to add some similar test framework implemented classes.  However, you are probably in a better position to enumerate the capabilities that you would want.

To start, I think that you would want:

1. A method to create a new byte array output stream
2. A method to create a new input stream from a URL
3. A method to create a new input stream from a string variable
4. The ability to create a new input stream from an output stream

That much could be accomplished by tweaking the semantics of the existing <var> and <assign> elements.  For example,

<!--   creates new byte array output stream   -->
<var name="outStream" type="DOMOutputStream"/>

<!--  creates new input stream from URL   -->
<var name="inStream" type="DOMInputStream" value="staff.xml"/>

<!--  creates new input stream from string   -->
<var name="inStream" type="DOMInputStream">
<assign var="inStream" value='&quot;<staff/>&quot;'/>

<!--  creates new input stream from out stream  -->
<assign var="inStream" value="outStream"/>


Could you list other capabilities that you would want and any suggested syntax.
Received on Monday, 27 January 2003 00:46:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:06 UTC