Add first rendering tests

This commit is contained in:
tsauerwein
2015-04-02 12:11:32 +02:00
parent 8e0c21eb58
commit c0a23dc818
39 changed files with 1099 additions and 3 deletions

View File

@@ -395,7 +395,12 @@
function expectResembleWebGL(map, referenceImage, tolerance, done) {
map.render();
map.on('postcompose', function(event) {
var webglCanvas = map.getTarget().children[0].children[0];
if (event.frameState.animate) {
// make sure the tile-queue is empty
return;
}
var webglCanvas = event.glContext.getCanvas();
expect(webglCanvas).to.be.a(HTMLCanvasElement);
// draw the WebGL canvas on a new canvas, because we can not create