<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/wmlbrowser/getcurrentcard/1" class="A" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#11.6" device="both">
  <assertion>When the WMLBrowser.getCurrentCard function is called, and the current
compilation unit has the same base URL as the calling WML deck,
the function returns the smallest relative URL (to the base of the current compilation
unit) specifying the card currently being processed by the WML Browser.
</assertion>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
    <result>
      <name>value</name>
      <value>.*</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go href="#card1"/>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<deck1>"/>
</onevent>
<onevent type="onenterbackward">
<go href="<responseurl>">
<postfield name="test" value="$test"/>
<postfield name="value" value="$ref"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <decks>
    <deck id="1">
      <![CDATA[<card id ="main">
<onevent type="onenterforward">
<go sendreferer="true" href="<script1>#main('test','ref')"/>
</onevent>
</card>
]]>
    </deck>
  </decks>
  <scripts>
    <script id="1">
      <![CDATA[extern function main(myvar,myval)
{
        var result = 'fail';
        var value = WMLBrowser.getCurrentCard();

    if (value == "<deck1>#main")
    {
       result = 'pass';
    }
        WMLBrowser.setVar(myvar,result);
        WMLBrowser.setVar(myval,value);
        WMLBrowser.prev();
        return 1;
}
]]>
    </script>
  </scripts>
</test>

