summaryrefslogtreecommitdiff
path: root/misc/openlayers/tests/deprecated/Ajax.html
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2014-08-12 21:56:44 +0200
committerChris Schlaeger <chris@linux.com>2014-08-12 21:56:44 +0200
commitea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch)
treeaf67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/tests/deprecated/Ajax.html
parent59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff)
downloadpostrunner-0.0.4.zip
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/tests/deprecated/Ajax.html')
-rw-r--r--misc/openlayers/tests/deprecated/Ajax.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/misc/openlayers/tests/deprecated/Ajax.html b/misc/openlayers/tests/deprecated/Ajax.html
new file mode 100644
index 0000000..e73e80c
--- /dev/null
+++ b/misc/openlayers/tests/deprecated/Ajax.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+ <script src="../OLLoader.js"></script>
+ <script src="../../lib/deprecated.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>