Skip to content

Commit 67fa2ea

Browse files
committed
Event: Move VML test out of event alias test
Ref gh-2693
1 parent 7d44d7f commit 67fa2ea

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

test/unit/event.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,11 +2833,6 @@ QUnit[ jQuery.fn.click ? "test" : "skip" ]( "trigger() shortcuts", function( ass
28332833
};
28342834
jQuery( "#simon1" ).click();
28352835
assert.equal( clickCounter, 1, "Check that click, triggers onclick event handler on an a tag also" );
2836-
2837-
// test that special handlers do not blow up with VML elements (#7071)
2838-
jQuery( "<xml:namespace ns='urn:schemas-microsoft-com:vml' prefix='v' />" ).appendTo( "head" );
2839-
jQuery( "<v:oval id='oval' style='width:100pt;height:75pt;' fillcolor='red'> </v:oval>" ).appendTo( "#form" );
2840-
jQuery( "#oval" ).click().keydown();
28412836
} );
28422837

28432838
QUnit[ jQuery.fn.click ? "test" : "skip" ]( "Event aliases", function( assert ) {
@@ -2858,6 +2853,21 @@ QUnit[ jQuery.fn.click ? "test" : "skip" ]( "Event aliases", function( assert )
28582853
} );
28592854
} );
28602855

2856+
// Support: IE9 (remove when IE9 is no longer supported)
2857+
// https://msdn.microsoft.com/en-us/library/hh801223(v=vs.85).aspx
2858+
QUnit.test( "VML with special event handlers (trac-7071)", function( assert ) {
2859+
assert.expect( 1 );
2860+
2861+
var ns = jQuery( "<xml:namespace ns='urn:schemas-microsoft-com:vml' prefix='v' />" ).appendTo( "head" );
2862+
2863+
jQuery( "<v:oval id='oval' style='width:100pt;height:75pt;' fillcolor='red'> </v:oval>" ).appendTo( "#form" );
2864+
jQuery( "#form" ).on( "keydown", function() {
2865+
assert.ok( true, "no error was thrown" );
2866+
} );
2867+
jQuery( "#oval" ).trigger( "click" ).trigger( "keydown" );
2868+
ns.remove();
2869+
} );
2870+
28612871
// These tests are unreliable in Firefox
28622872
if ( !( /firefox/i.test( window.navigator.userAgent ) ) ) {
28632873
QUnit.test( "Check order of focusin/focusout events", function( assert ) {

0 commit comments

Comments
 (0)