From 67fa2eab6ef323b1d894e9e7f054c6e8c844d304 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Sat, 7 Nov 2015 15:51:03 -0500 Subject: [PATCH] Event: Move VML test out of event alias test Ref gh-2693 --- test/unit/event.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/test/unit/event.js b/test/unit/event.js index 619307567..12a2b0a5f 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -2833,11 +2833,6 @@ QUnit[ jQuery.fn.click ? "test" : "skip" ]( "trigger() shortcuts", function( ass }; jQuery( "#simon1" ).click(); assert.equal( clickCounter, 1, "Check that click, triggers onclick event handler on an a tag also" ); - - // test that special handlers do not blow up with VML elements (#7071) - jQuery( "" ).appendTo( "head" ); - jQuery( " " ).appendTo( "#form" ); - jQuery( "#oval" ).click().keydown(); } ); QUnit[ jQuery.fn.click ? "test" : "skip" ]( "Event aliases", function( assert ) { @@ -2858,6 +2853,21 @@ QUnit[ jQuery.fn.click ? "test" : "skip" ]( "Event aliases", function( assert ) } ); } ); +// Support: IE9 (remove when IE9 is no longer supported) +// https://msdn.microsoft.com/en-us/library/hh801223(v=vs.85).aspx +QUnit.test( "VML with special event handlers (trac-7071)", function( assert ) { + assert.expect( 1 ); + + var ns = jQuery( "" ).appendTo( "head" ); + + jQuery( " " ).appendTo( "#form" ); + jQuery( "#form" ).on( "keydown", function() { + assert.ok( true, "no error was thrown" ); + } ); + jQuery( "#oval" ).trigger( "click" ).trigger( "keydown" ); + ns.remove(); +} ); + // These tests are unreliable in Firefox if ( !( /firefox/i.test( window.navigator.userAgent ) ) ) { QUnit.test( "Check order of focusin/focusout events", function( assert ) { -- 2.39.5