git-svn-id: http://svn.openlayers.org/trunk/openlayers@11162 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
28 lines
925 B
HTML
28 lines
925 B
HTML
<html>
|
|
<head>
|
|
<script src="OLLoader.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
function test_Ajax_loadUrl(t) {
|
|
t.plan(5);
|
|
var _get = OpenLayers.Request.GET;
|
|
var caller = {};
|
|
var onComplete = function() {};
|
|
var onFailure = function() {};
|
|
var params = {};
|
|
OpenLayers.Request.GET = function(config) {
|
|
t.eq(config.url, "http://example.com/?format=image+kml", "correct url")
|
|
t.eq(config.params, params, "correct params");
|
|
t.eq(config.scope, caller, "correct scope");
|
|
t.ok(config.success === onComplete, "correct success callback");
|
|
t.ok(config.failure === onFailure, "correct failure callback");
|
|
};
|
|
OpenLayers.loadURL("http://example.com/?format=image+kml", params, caller, onComplete, onFailure);
|
|
OpenLayers.Request.GET = _get;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|