From 877f4b4cc6796fa4bb7307c7c8c9e67d86ce1276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 7 Mar 2012 22:01:25 +0100 Subject: [PATCH] make the PanZoom tests pass in IE 9+, by not running tests that rely on document.createEvent in this browser too, no functional change (refs #277) --- tests/Control/PanZoom.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/Control/PanZoom.html b/tests/Control/PanZoom.html index e99398e7e6..4982fb0abe 100644 --- a/tests/Control/PanZoom.html +++ b/tests/Control/PanZoom.html @@ -43,8 +43,19 @@ function test_Control_PanZoom_control_events (t) { - if ( !window.document.createEvent || OpenLayers.BROWSER_NAME == "opera" || !t.open_window) { - //ie can't simulate mouseclicks + // IE 9+ does support the standard document.createEvent, + // event.initMouseEvent, and elem.dispatchEvent calls, so it + // should be possible to simulate clicks in this browser. + // For example it looks like jQuery UI does simulate events + // using document.createElement in IE 9+. See + // https://github.com/jquery/jquery-ui/blob/master/tests/jquery.simulate.js. + // I haven't been able to make it work though. + + if ( !window.document.createEvent || + OpenLayers.BROWSER_NAME == "msie" || + OpenLayers.BROWSER_NAME == "opera" || + !t.open_window) { + t.plan(0); t.debug_print("FIXME: This browser does not support the PanZoom test at this time."); } else {