Sha256: 24bad82f09b2ae0e08d4bc00965726e9fe85444b6317f9d7af0659579002a04a
Contents?: true
Size: 1.53 KB
Versions: 7
Compression:
Stored size: 1.53 KB
Contents
<html> <head> <script src="../OLLoader.js"></script> <script type="text/javascript"> function test_read(t) { t.plan(4); var _v1_0_0 = OpenLayers.Format.WCSCapabilities.v1_0_0.prototype.read; var _v1_1_0 = OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read; var parser = new OpenLayers.Format.WCSCapabilities(); // version 1.0.0 var text = '<?xml version="1.0" encoding="UTF-8"?>' + '<wcs:WCS_Capabilities version="1.0.0" xmlns:wcs="http://www.opengis.net/wcs"></wcs:WCS_Capabilities>'; OpenLayers.Format.WCSCapabilities.v1_0_0.prototype.read = function() { t.ok(true, "Version 1.0.0 detected"); return {}; } var res = parser.read(text); t.eq(res.version, "1.0.0", "version 1.0.0 written to result object"); OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read = _v1_1_0; // version 1.1.0 var text = '<?xml version="1.0" encoding="UTF-8"?>' + '<wcs:WCS_Capabilities version="1.1.0" xmlns:wcs="http://www.opengis.net/wcs/1.1"></wcs:WCS_Capabilities>'; OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read = function() { t.ok(true, "Version 1.1.0 detected"); return {}; } var res = parser.read(text); t.eq(res.version, "1.1.0", "version 1.1.0 written to result object"); OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read = _v1_1_0; } </script> </head> <body> </body> </html>
Version data entries
7 entries across 7 versions & 1 rubygems