RE: DOMOutputStream

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