<?xml version="1.0" encoding="UTF-8"?>
<!--

  $Author: richard $

  $Revision: 1.5 $

  $Log: 1,v $
  Revision 1.5  2002/04/19 14:18:28  richard
  yesno

  Revision 1.4  2002/03/26 16:39:24  richard
  rewrite test

  Revision 1.3  2001/10/30 16:22:17  gb
  Modified all the test files in the wml2 directory such that it puts the <?xml?> declaration back at the top of the file, before the comment.

  Revision 1.2  2001/10/08 21:56:08  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/markup/eventsmodule/wmloneventelement/1" class="A" 
	scope="wml2" testtype="application" type="manual" 
	source="wml2#6.15.1" device="both">
	<assertion>When a WML:ONEVENT element is used, it must be scoped to 
	the element in which it is declared.
	</assertion>
	<specnote>Create a document with at least two cards. The both cards 
	should hold a WML:ONEVENT element set to 'timer'. Display both cards, 
	and make sure that the timer only executes for the card that holds 
	the event binding.
	</specnote>
	<results>
		<result>
			<name>submit</name>
			<value>yes</value>
		</result>
	</results>
	<method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
				<wml:onevent type="timer">
					<wml:go href="#card3"/>
				</wml:onevent>
				<wml:timer name="timer" value="50"/>
				<p>You should be taken to card3 in 5 secondes</p>
				<p>Were you taken to card3 after 5 secondes?
					<br/>
					[[yesno]]
				</p>
			</wml:card>
			<wml:card id="card2" title="card2">
				<p>This is card 2<br />
					You shouldn't reach this card. The test has failed.<br/>
					Now go back to card1
				</p>
				<wml:do type="accept">
					<wml:go href="#main"/>
				</wml:do>
				<wml:onevent type="timer">
					<wml:go href="#card3"/>
				</wml:onevent>
				<wml:timer name="timer" value="5"/>
			</wml:card>
			<wml:card id="card3" title="card3">
				<wml:do type="accept">
					<wml:prev />
				</wml:do>
				<p>This is card 3<br />
					Now go back and answer the question.
				</p>
			</wml:card>
		]]>
	</method>
</test>
