Files
openlayers/test
Tim Schaub be255ed6c7 Adding ol.Expression
This simple expression constructor will be used for symbolizer properties and the layer will generate symbolizer literals for rendering by evaluating any expressions with a feature as the this argument and feature attributes as the scope.  This allows generating labels that concatenate multiple attribute values together or displaying point symbols that are sized according to a population attribute divided by an area attribute, for example.

This implementation will not work in environments where the content security policy disallows the use of the Function constructor.  This is the case on browser extensions.  A more content-security-policy-friendly implementation would be to come up with a restricted grammar and write a lex/parser.  This is the road I started down, but this verison is far less code, and I think the security policy limitations are minor at this point.  This version will always be faster/lighter than a parser, so one is written in the future, it should only be pulled in where content security policy mandates it.
2013-02-14 17:19:15 -07:00
..
2012-06-18 18:15:51 +02:00
2012-09-24 22:34:08 +02:00
2013-02-14 17:19:15 -07:00
2013-01-31 10:18:21 +01:00
2012-09-25 12:04:57 +02:00
2013-01-31 10:18:21 +01:00

Included in this directory

  • ol.html - the web page used to run the test suite.

  • spec - includes the OpenLayers test/spec files.

  • jasmine-1.2.0 - includes the Jasmine Testing Framework. https://github.com/pivotal/jasmine

  • jasmine-extensions.js - includes OpenLayers-specific extensions to Jasmine.

  • phantom-jasmine - a PhantomJS script and a console reporter to for headless testing. Comes from https://github.com/jcarver989/phantom-jasmine.

Run the test suite with PhantomJS

With PhantomJS installed, and assuming phantomjs is in the PATH:

$ phantomjs phantom-jasmine/run_jasmine_test.coffee ol.html

(Works with PhantomJS 1.6.1, untested with other versions.)

This command can also be run by doing make test at the root of ol3.

Tip for TDD'ers: to make PhantomJS run the test suite continuously each time a spec file is changed you can use nosier (http://pypi.python.org/pypi/nosier) and do nosier -p test -p src "make test".