diff --git a/tests/unit/buttonMarkup/buttonMarkup_core.js b/tests/unit/buttonMarkup/buttonMarkup_core.js index ae135832..53cb0532 100644 --- a/tests/unit/buttonMarkup/buttonMarkup_core.js +++ b/tests/unit/buttonMarkup/buttonMarkup_core.js @@ -26,4 +26,22 @@ ok(!group.find('[data-iconshadow=false] .ui-icon').hasClass("ui-icon-shadow"), "buttons with data-iconshadow=false should not have the ui-icon-shadow class on their icons"); }); + + // Test for issue #3046 and #3054: + test( "mousedown on SVG elements should not throw an exception", function(){ + var svg = $("#embedded-svg"), + success = true, + rect; + ok(svg.length > 0, "found embedded svg document" ); + if ( svg.length > 0 ) { + rect = $( "rect", svg ); + ok(rect.length > 0, "found rect" ); + try { + rect.trigger("mousedown"); + } catch ( ex ) { + success = false; + } + ok( success, "mousedown executed without exception"); + } + }); })(jQuery); diff --git a/tests/unit/buttonMarkup/index.html b/tests/unit/buttonMarkup/index.html index 57bbb378..94bb9391 100644 --- a/tests/unit/buttonMarkup/index.html +++ b/tests/unit/buttonMarkup/index.html @@ -30,6 +30,9 @@ No shadow or corners No iconshadow +