Make spec indentation pass strict mode

This commit is contained in:
Tom Payne
2013-03-04 20:47:20 +01:00
parent 9b122815ce
commit f6fe7bd36c
10 changed files with 106 additions and 106 deletions

View File

@@ -3,10 +3,10 @@ goog.provide('ol.test.parser.ogc.WMSCapabilities');
describe('test WMSCapabilities', function() {
describe('test getVersion', function() {
var snippet = '<WMS_Capabilities version="1.3.0" ' +
'xmlns="http://www.opengis.net/wms"><Service></Service>' +
'</WMS_Capabilities>';
'xmlns="http://www.opengis.net/wms"><Service></Service>' +
'</WMS_Capabilities>';
var snippet2 = '<WMS_Capabilities xmlns="http://www.opengis.net/wms">' +
'<Service></Service></WMS_Capabilities>';
'<Service></Service></WMS_Capabilities>';
it('Version taken from document', function() {
var parser = new ol.parser.ogc.WMSCapabilities();
var data = parser.read(snippet);
@@ -28,7 +28,7 @@ describe('test WMSCapabilities', function() {
expect(version).toEqual('1.3.0');
});
var msg = 'defaultVersion returned if no version specified in options ' +
'and no version on the format';
'and no version on the format';
it(msg, function() {
var version = parser.getVersion(null);
expect(version).toEqual('1.1.1');

View File

@@ -57,8 +57,8 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1', function() {
expect(getfeatureinfo.post.href).toEqual(post);
expect(capability.layers).toBeTruthy();
expect(capability.layers.length).toEqual(22);
var infoFormats = ['text/plain', 'text/html',
'application/vnd.ogc.gml'];
var infoFormats =
['text/plain', 'text/html', 'application/vnd.ogc.gml'];
expect(layer.infoFormats).toEqual(infoFormats);
expect(layer.name).toEqual('tiger:tiger_roads');
expect(layer.prefix).toEqual('tiger');
@@ -66,13 +66,13 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1', function() {
var abstr = 'Highly simplified road layout of Manhattan in New York..';
expect(layer['abstract']).toEqual(abstr);
var bbox = [-74.08769307536667, 40.660618924633326,
-73.84653192463333, 40.90178007536667];
-73.84653192463333, 40.90178007536667];
expect(layer.llbbox).toEqual(bbox);
expect(layer.styles.length).toEqual(1);
expect(layer.styles[0].name).toEqual('tiger_roads');
var legend = 'http://publicus.opengeo.org:80/geoserver/wms/' +
'GetLegendGraphic?VERSION=1.0.0&FORMAT=image/png&WIDTH=20&' +
'HEIGHT=20&LAYER=tiger:tiger_roads';
'GetLegendGraphic?VERSION=1.0.0&FORMAT=image/png&WIDTH=20&' +
'HEIGHT=20&LAYER=tiger:tiger_roads';
expect(layer.styles[0].legend.href).toEqual(legend);
expect(layer.styles[0].legend.format).toEqual('image/png');
expect(layer.queryable).toBeTruthy();
@@ -168,28 +168,28 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1', function() {
expect(elevation['default']).toEqual('0');
expect(elevation.nearestVal).toBeTruthy();
expect(elevation.multipleVal).toBeFalsy();
expect(elevation.values).toEqual(['0', '1000', '3000', '5000',
'10000']);
expect(elevation.values).toEqual(
['0', '1000', '3000', '5000', '10000']);
});
});
});
describe('test contact info', function() {
it('Test contact info', function() {
var obj, service, contactinfo, personPrimary, addr;
runs(function() {
var url = 'spec/ol/parser/ogc/xml/wmscapabilities_v1_1_1/' +
'ogcsample.xml';
goog.net.XhrIo.send(url, function(e) {
var xhr = e.target;
obj = parser.read(xhr.getResponseXml());
service = obj.service;
contactinfo = service.contactInformation;
personPrimary = contactinfo.personPrimary;
addr = contactinfo.contactAddress;
});
});
waitsFor(function() {
it('Test contact info', function() {
var obj, service, contactinfo, personPrimary, addr;
runs(function() {
var url = 'spec/ol/parser/ogc/xml/wmscapabilities_v1_1_1/' +
'ogcsample.xml';
goog.net.XhrIo.send(url, function(e) {
var xhr = e.target;
obj = parser.read(xhr.getResponseXml());
service = obj.service;
contactinfo = service.contactInformation;
personPrimary = contactinfo.personPrimary;
addr = contactinfo.contactAddress;
});
});
waitsFor(function() {
return (obj !== undefined);
}, 'XHR timeout', 1000);
runs(function() {

View File

@@ -25,7 +25,7 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1_wmsc', function() {
runs(function() {
expect(tilesets.length).toEqual(2);
var bbox = [-13697515.466796875, 5165920.118906248,
-13619243.94984375, 5244191.635859374];
-13619243.94984375, 5244191.635859374];
expect(tileset.bbox['EPSG:900913'].bbox).toEqual(bbox);
expect(tileset.format).toEqual('image/png');
expect(tileset.height).toEqual(256);
@@ -33,14 +33,14 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1_wmsc', function() {
expect(tileset.layers).toEqual('medford:hydro');
expect(tileset.srs['EPSG:900913']).toBeTruthy();
var resolutions = [156543.03390625, 78271.516953125, 39135.7584765625,
19567.87923828125, 9783.939619140625, 4891.9698095703125,
2445.9849047851562, 1222.9924523925781, 611.4962261962891,
305.74811309814453, 152.87405654907226, 76.43702827453613,
38.218514137268066, 19.109257068634033, 9.554628534317017,
4.777314267158508, 2.388657133579254, 1.194328566789627,
0.5971642833948135, 0.29858214169740677, 0.14929107084870338,
0.07464553542435169, 0.037322767712175846, 0.018661383856087923,
0.009330691928043961, 0.004665345964021981];
19567.87923828125, 9783.939619140625, 4891.9698095703125,
2445.9849047851562, 1222.9924523925781, 611.4962261962891,
305.74811309814453, 152.87405654907226, 76.43702827453613,
38.218514137268066, 19.109257068634033, 9.554628534317017,
4.777314267158508, 2.388657133579254, 1.194328566789627,
0.5971642833948135, 0.29858214169740677, 0.14929107084870338,
0.07464553542435169, 0.037322767712175846, 0.018661383856087923,
0.009330691928043961, 0.004665345964021981];
expect(tileset.resolutions).toEqual(resolutions);
expect(tileset.styles).toEqual('');
});

View File

@@ -100,8 +100,8 @@ describe('ol.parser.ogc.wmscapabilities_v1_3_0', function() {
expect(elevation['default']).toEqual('0');
expect(elevation.nearestVal).toBeTruthy();
expect(elevation.multipleVal).toBeFalsy();
expect(elevation.values).toEqual(['0', '1000', '3000', '5000',
'10000']);
expect(elevation.values).toEqual(
['0', '1000', '3000', '5000', '10000']);
expect(contactinfo).toBeTruthy();
expect(personPrimary).toBeTruthy();
expect(personPrimary.person).toEqual('Jeff Smith');

View File

@@ -110,10 +110,10 @@ describe('ol.parser.ogc.wmtscapabilities_v1_0_0', function() {
expect(layer.resourceUrls.tile.hasOwnProperty(format)).toBeTruthy();
expect(layer.resourceUrls.tile[format].length).toEqual(2);
var tpl = 'http://a.example.com/wmts/coastlines/{TileMatrix}/' +
'{TileRow}/{TileCol}.png';
'{TileRow}/{TileCol}.png';
expect(layer.resourceUrls.tile[format][0]).toEqual(tpl);
tpl = 'http://b.example.com/wmts/coastlines/{TileMatrix}/' +
'{TileRow}/{TileCol}.png';
'{TileRow}/{TileCol}.png';
expect(layer.resourceUrls.tile[format][1]).toEqual(tpl);
expect(layer.resourceUrls.hasOwnProperty('FeatureInfo')).toBeTruthy();
format = 'application/gml+xml; version=3.1';
@@ -121,7 +121,7 @@ describe('ol.parser.ogc.wmtscapabilities_v1_0_0', function() {
.toBeTruthy();
expect(layer.resourceUrls.FeatureInfo[format].length).toEqual(1);
tpl = 'http://www.example.com/wmts/coastlines/{TileMatrixSet}/' +
'{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml';
'{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml';
expect(layer.resourceUrls.FeatureInfo[format][0]).toEqual(tpl);
expect(dimensions.length).toEqual(1);
expect(dimensions[0].title).toEqual('Time');