Re: byteStream, characterStream etc...

That will require defining of a framework utility class.  For example, to
support the events tests, I created a framework provided class named
"EventMonitor", that would capture all the events that were dispatched to it
and could be queried later.

For example, dispatchEvent10
...
<!--   special type, implies construction    -->
<var name="monitor" type="EventMonitor"/>
...
<load var="doc" href="hc_staff" willBeModified="true"/>
<!--  EventMonitor implements EventListener   -->
<addEventListener obj="doc" type='"foo"' listener="monitor"
useCapture="false"/>
<addEventListener obj="doc" type='"foo"' listener="monitor"
useCapture="false"/>
<!--   DocumentEvent and EventTarget methods   -->
<createEvent var="evt" obj="doc" eventType='"Events"'/>
<initEvent obj="evt" eventTypeArg='"foo"' canBubbleArg="true"
cancelableArg="false"/>
<dispatchEvent var="preventDefault" obj="doc" evt="evt"/>
<!--  EventMonitor method, gets all events where .phase = AT_TARGET   -->
<atEvents obj="monitor" var="atEvents"/>
<assertSize id="atCount" collection="atEvents" size="1"/>
<!--  EventMonitor method, gets all events where .phase = BUBBLED   -->
<bubbledEvents obj="monitor" var="bubbledEvents"/>
<assertSize id="bubbleCount" collection="bubbledEvents" size="0"/>
<capturedEvents obj="monitor" var="capturedEvents"/>
<assertSize id="captureCount" collection="capturedEvents" size="0"/>
</test>




You would want to do a similar thing for Load/Save, define a framework
implemented class that makes the tests as simple as possible.  I would
assume that the utility type for the load-save tests would implement
DOMInputSource and DOMOutputStream.  If you could provide a definition of
your ideal utility class, then I can work it into the markup language and
into the framework.  Otherwise, you could commit your tests, but comment
where something "magical" happens and we can fit a utility class to do the
magic things.


----- Original Message -----
From: "Jeroen van Rotterdam" <jvrdam@xs4all.nl>
To: <www-dom-ts@w3.org>
Sent: Tuesday, August 13, 2002 2:33 PM
Subject: byteStream, characterStream etc...


>
> Hi,
>
>
> Any idea how to obtain a:
>
> - DOMInputStream
> - DOMReader
> (see dom level 3 DOMInputSource)
>
> In the test framework ?
>
>
> How will we organize absolute URI's for parsing test documents ?
> (see dom level 3 DOMInputSource systemId)
>
> In the case of a systemId on DOMInputSource, the uri can't be a relative
> URI since the behaviour is then implementation dependant.
> Jeroen
>
> =====
> X-Hive Corporation
> Jeroen van Rotterdam, CEO
> e-mail: jeroen@x-hive.com
> phone: +31 10 7108600
> http://www.x-hive.com
>
>
>
>
>

Received on Wednesday, 14 August 2002 01:32:14 UTC