Sha256: 9ff98c6375deef587a72db1c3198343dc390a3b338fb2ba5d5d9b37e627335e2

Contents?: true

Size: 1.94 KB

Versions: 12

Compression:

Stored size: 1.94 KB

Contents

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>XHR Acceptance Test</title>
    <script src="../../lib/OpenLayers.js"></script>
    <script type="text/javascript">
        var url = "ajax.txt";
        function sendSynchronous(){
            var request = OpenLayers.Request.GET({
                url: url,
                async: false,
                callback: function() {
                    document.getElementById('send_sync').value += 'request completed\n';
                }
            });
            document.getElementById('send_sync').value += 'other processing\n';
        }
        function sendAsynchronous(){
            var request = OpenLayers.Request.GET({
                url: url,
                callback: function() {
                    document.getElementById('send_sync').value += 'request completed\n';
                }
            });
            document.getElementById('send_sync').value += 'other processing\n';
        }
        function sendAndAbort(){
            var request = OpenLayers.Request.GET({
                url: url,
                callback: function() {
                    document.getElementById('send_sync').value += 'never called\n';
                }
            });
            request.abort();
            document.getElementById('send_sync').value += 'other processing\n';
        }

        </script>
    </head>
    <body >
        <button onclick="sendSynchronous()">synchronous</button>
        expected output: "request completed" then "other processing"<br />
        <button onclick="sendAsynchronous()">asynchronous</button>
        expected output: "other processing" then "request completed"<br />
        <button onclick="sendAndAbort()">send and abort</button>
        expected output: "other processing" (and not "never called")<br />
        <textarea id="send_sync" rows="6"></textarea><br />
        <button onclick="document.getElementById('send_sync').value = ''">Clear</button>
  </body>
</html>

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
postrunner-0.0.10 misc/openlayers/tests/manual/ajax.html
postrunner-0.0.9 misc/openlayers/tests/manual/ajax.html
postrunner-0.0.8 misc/openlayers/tests/manual/ajax.html
postrunner-0.0.7 misc/openlayers/tests/manual/ajax.html
postrunner-0.0.6 misc/openlayers/tests/manual/ajax.html
postrunner-0.0.5 misc/openlayers/tests/manual/ajax.html
postrunner-0.0.4 misc/openlayers/tests/manual/ajax.html
gb_mapfish_appserver-0.0.5 vendor/assets/javascripts/openlayers/tests/manual/ajax.html
gb_mapfish_appserver-0.0.4 vendor/assets/javascripts/openlayers/tests/manual/ajax.html
gb_mapfish_appserver-0.0.3 vendor/assets/javascripts/openlayers/tests/manual/ajax.html
gb_mapfish_appserver-0.0.2 vendor/assets/javascripts/openlayers/tests/manual/ajax.html
gb_mapfish_appserver-0.0.1 vendor/assets/javascripts/openlayers/tests/manual/ajax.html