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

  $Author: richard $

  $Revision: 1.5 $

  $Log: 2,v $
  Revision 1.5  2002/04/19 16:16:40  richard
  autofailed

  Revision 1.4  2002/03/17 16:35:31  richard
   rewrite test

  Revision 1.3  2001/10/30 16:22:59  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:32  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/timerprocessing/2" class="A" scope="wml2" 
	testtype="application" type="auto" source="wml2#5.11" device="both">
  <assertion>When a timer is started, it must decrement from its initial 
  value, triggering the delivery of a WML-ONTIMER event on transition 
  from a value of one to zero.
	</assertion>
	<notes>Create a card that contains a WML:ONEVENT element(TYPE 
	attribute set to 'timer'), that will navigate to a second card and 
	display the variable named by the WML:TIMER element. The card should 
	also contain a WML:TIMER element with its NAME and VALUE(set to '100') 
	attributes set. The card should also hold a link which allows the user 
	to navigate away before the timer has expired, and display the timers 
	current value. Display the card, navigate away, make sure the variable 
	named by the timer is greater than zero, then navigate back and allow
	the timer to expire. This timer when you are taken to the second card, 
	the named variable should hold the value '0'.
	</notes>
  <specnote>Create a card that holds a WML:EVENT binding, with its TYPE 
  attribute set to 'timer',  that will navigate to a second card indicating 
  timer expiration. The first card should also include a WML:TIMER element 
  its NAME and VALUE(set to '5') attributes set. Display the card, and 
  make sure when you are taken to the second card, that the value of the 
  timer variable is '0'.
  </specnote>
  <results>
    <result>
      <name>timer</name>
      <value>0</value>
    </result>
  </results>
  <method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
  			<wml:onevent type="timer">
    			<wml:go href="[[resulturl]]">
     	 			<wml:postfield name="timer" value="$timer" />
      			[[sessionvars]]
    			</wml:go>
  			</wml:onevent>
		  	<wml:timer name="timer" value="5" />
  			<p>You should be taken to the next test in less than 5 seconds.</p>
				[[auto_failed]]
			</wml:card>
		]]>
  </method>

</test>
