Stricter check for ImageData constructor

This commit is contained in:
Andreas Hocevar
2016-02-23 19:43:06 +01:00
parent 2df40f4b88
commit 8e489304c1

View File

@@ -17,7 +17,14 @@ function itNoPhantom() {
}
}
(typeof ImageData == 'function' ? describe : xdescribe)('ol.source.Raster',
var hasImageDataConstructor = true;
try {
new ImageData(1, 1);
} catch (e) {
hasImageDataConstructor = false;
}
(hasImageDataConstructor ? describe : xdescribe)('ol.source.Raster',
function() {
var target, map, redSource, greenSource, blueSource, raster;