<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscript/core/pragmas/access/1" class="A" scope="wmlscript" testtype="application" type="manual" source="wmls11#6.7.2" device="both">
  <assertion>When an external function is invoked, an access control check is performed to ensure that the destination compilation unit can be accessed from the current compilation unit.
</assertion>
  <results>
    <result>
      <name>submit</name>
      <value>yes</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<p>Select this&nbsp;<a href="<script2>#main('card2')">link1</a>&nbsp;to try to access a reachable script.</p>
<p>Select this&nbsp;<a href="<script1>#main('card1')">link2</a>&nbsp;to try to access a script that has access restrictions.</p>
<p>Select this&nbsp;<a href="<script2>#main('card2')">link3</a>&nbsp;to try to access a reachable script.</p>
<p mode="wrap">Did the user agent allow access from link1, deny access from link2 and allow access from link3?
<br />
<yesno>
</p>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<p>You should never get here.</p>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[use access domain "nonsense.domain";

extern function main(next) {
        WMLBrowser.go('#' + next);
        return 1;
}
]]>
    </script>
    <script id="2">
      <![CDATA[
extern function main(next) {
        Dialogs.alert("Reachable script called");
        return 1;
}


]]>
    </script>
  </scripts>
</test>

