3 <script src="../lib/OpenLayers.js"></script>
4 <script type="text/javascript">
6 function test_Ajax_loadUrl(t) {
8 var _get = OpenLayers.Request.GET;
10 var onComplete = function() {};
11 var onFailure = function() {};
13 OpenLayers.Request.GET = function(config) {
14 t.eq(config.url, "http://example.com/?format=image+kml", "correct url")
15 t.eq(config.params, params, "correct params");
16 t.eq(config.scope, caller, "correct scope");
17 t.ok(config.success === onComplete, "correct success callback");
18 t.ok(config.failure === onFailure, "correct failure callback");
20 OpenLayers.loadURL("http://example.com/?format=image+kml", params, caller, onComplete, onFailure);
21 OpenLayers.Request.GET = _get;