<?xml version="1.0" encoding="UTF-8"?>
<test id="wae/media/wmlscript/wmlsrules/2" class="A" scope="wae" 
	testtype="application" type="manual" source="wae#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[
			<card newcontext="true" id="main">
				<p>The script referenced by this 
					<a href="<script1>#main('test','card1')">link</a> 
					displays a variable.
				</p>
			</card>
		]]>
	</method>
	<cards>
		<card id="1">
			<![CDATA[
				<card id="card1">
					<onevent type="onenterforward">
						<go href="<resulturl>">
							<postfield name="test" value="$test"/>
							<sessionvars>
						</go>
					</onevent>
					<auto_failed>
				</card>
			]]>
		</card>
	</cards>
	<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>
