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

  $Author: richard $

  $Revision: 1.9 $

  $Log: 3,v $
  Revision 1.9  2002/06/16 09:58:34  richard
  remove the body element

  Revision 1.8  2002/04/26 09:00:45  richard
  xml not well formed

  Revision 1.7  2002/04/20 09:04:06  richard
  yesno

  Revision 1.6  2002/04/19 16:13:22  richard
  autofailed, missing / or extra / on wml:carcd element
  move the fragment into a page document

  Revision 1.5  2002/03/26 09:26:16  richard
  role attribute

  Revision 1.4  2002/02/27 14:57:04  richard
  rewrite tests,correct bug, pass as auto

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


-->
<test id="wml2/uabehaviour/navigationreference/prevtask/3" class="A" 
	scope="wml2" testtype="application" type="manual" source="wml2#5.3.2" 
	device="both">
	<assertion>When the WML:PREV task is executed and the target URI is a 
	card in the same document, the fragment identifier of the target URI must 
	be the card fetched.
	</assertion>
	<specnote>Create a card that links to a second card. The second card must 
	contain a WML:PREV task set within a WML:ANCHOR element, that will 
	navigate back to the first card. Call the first card(using a fragment 
	identifier), Navigate to the second card and then press the back button. 
	This will take you back to the first card, at the section that matches 
	the fragment identifier.
	</specnote>
	<results>
		<result>
			<name>submit</name>
			<value>yes</value>
		</result>
	</results>
	<method>
		<![CDATA[
			<wml:card newcontext="true" id="main">
				<wml:onevent type="enterforward">
					<wml:go href="[[page1]]" />
				</wml:onevent>
				[[auto_failed]]
			</wml:card>
		]]>
  </method>
	<pages>
		<page id="1">
			<![CDATA[
				<?xml version="1.0" encoding="UTF-8"?>
				<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD WML 2.0//EN" "http://www.wapforum.org/wml20.dtd">
				<html xmlns="http://www.w3.org/1999/xhtml"
					xmlns:wml="http://www.wapforum.org/2001/wml"
					wml:use-xml-fragments="true">
					<head>
						<title>prev task 3</title>
					</head>
					<wml:card newcontext="true" id="main" title="main">
							<wml:onevent type="enterforward">
								<wml:go href="#p1" />
							</wml:onevent>
							[[auto_failed]]
						</wml:card>
						<wml:card id="card2" title="card2">
							<wml:do type="prev">
								<wml:prev />
							</wml:do>
							<p id="p1">This is #p1
								click this &nbsp;<a href="#card3">link</a>&nbsp;
								to go to card3 and when return to this card
								<br/>
							</p>
							<p>Have you returned to the #p1 anchor after returning from the card3 ?
								<br/>
								[[yesno]]
							</p>
						</wml:card>
						<wml:card id="card3" title="card3">
							<wml:do type="prev">
								<wml:prev />
							</wml:do>
							<p>This is card three.<br /><br />
								Now please return to the second card.
							</p>
					</wml:card>
				</html>
			]]>
		</page>
	</pages>
</test>
