From 8e489304c17875421634518fe0d7249e5dd05603 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 23 Feb 2016 19:43:06 +0100 Subject: [PATCH] Stricter check for ImageData constructor --- test/spec/ol/source/rastersource.test.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/spec/ol/source/rastersource.test.js b/test/spec/ol/source/rastersource.test.js index 882a781d28..b127f04a33 100644 --- a/test/spec/ol/source/rastersource.test.js +++ b/test/spec/ol/source/rastersource.test.js @@ -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;