<?xml version="1.0" encoding="UTF-8"?>
<test id="wae2/media/wmlscript/wmlsrules/2" class="A" scope="wae2" 
	testtype="application" type="manual" source="wae2#6.4.2" device="both">
	<assertion>When a WAE user agent requests content that includes 
	WMLScript Libraries it must process it.
	</assertion>
	<specnote>Get the user to access a document that contains WMLScript
	libraries. Make sure that the page is displayed and the WMLScript 
	has been executed correctly.
	</specnote>
	<results>
		<result>
			<name>test</name>
			<value>pass</value>
		</result>
	</results>
	<method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
				<p>The script referenced by this 
					<a href="[[script1]]#main('test','card2')">link</a> 
					displays a variable.
				</p>
				[[auto_failed]]
			</wml:card>
			<wml:card id="card2" title="card2">
				<p>This is card2</p>
				<wml:onevent type="enterforward">
					<wml:go href="[[resulturl]]">
						<wml:postfield name="test" value="$test"/>
						[[sessionvars]]
					</wml:go>
				</wml:onevent>
				[[auto_failed]]
			</wml:card>
		]]>
	</method>
	<scripts>
		<script id="1">
			<![CDATA[
extern function main(myvar,next) {
	var result = 'fail';
	var lowvalue = Lang.minInt();
	var highvalue = Lang.maxInt();

	if (lowvalue == Lang.minInt() && highvalue == Lang.maxInt()) {
		result = 'pass';
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
			]]>
		</script>
	</scripts>
</test>
