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

  $Author: richard $

  $Revision: 1.6 $

  $Log: 4,v $
  Revision 1.6  2002/04/20 09:04:06  richard
  yesno

  Revision 1.5  2002/03/26 09:42:28  richard
  includes the external decks

  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/4" 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 separate
  document, the fragment identifier of the target URI must be the part of the
  document fetched.
  </assertion>
  <specnote>Create a card that links to a card in a second document. The card in
  the second document should contain a WML:PREV task set within a WML:DO element, 
  that will navigate back to the part of the first document that was first linked 
  to. Call the first document(using a fragment identifier), navigate to the second 
  document and then press the back button. This will take you back to the first 
  document, 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" title="main">
      <p>This is main</p>
      <wml:onevent type="enterforward">
        <wml:go href="[[page1]]#pass" />
      </wml:onevent>
      <p>Was the second card2 of doc2 re-displayed when pressing the back 
      	button from card1 of doc3?
				<br/>
				[[yesno]]
			</p>
    </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>Prevtask 4</title>
					</head>
    <wml:card id="card1" title="card1-doc2">
      <wml:do type="prev">
        <wml:prev />
      </wml:do>
      <p>
        You should not reach this card<br />
        If you do then the test has failed.
      </p>
      </wml:card>
      <wml:card id="card2" title="card2-doc2">
        <wml:do type="prev">
          <wml:prev />
        </wml:do>
      <p id="pass">
        This is card2 of doc2.<br />
        Click this &nbsp;<a href="[[page2]]">link</a>&nbsp;
        to go to card3, then press the back button to return here.
      </p>
      <p>
        Once you have been to card1 of doc3, press the back button to return to card1 of doc1<br />
      </p>
    </wml:card>
				</html>
			]]>
		</page>
		<page id="2">
			<![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>Prevtask 4</title>
					</head>
    <wml:card id="card1" title="card1-doc3">
      <wml:do type="prev">
        <wml:prev />
      </wml:do>
      <p>
        This is doc3, press the back button and make sure you return to card2 of doc2.<br />
      </p>
      </wml:card>
				</html>
			]]>
		</page>
	</pages>
</test>

