@@ -434,11 +434,20 @@ QUnit.test( "zIndex, applied to all handles", function( assert ) {
434434} ) ;
435435
436436QUnit . test ( "setOption handles" , function ( assert ) {
437- assert . expect ( 11 ) ;
438-
439- var target = $ ( "<div></div>" ) . resizable ( ) ;
440-
441- function checkHandles ( expectedHandles ) {
437+ assert . expect ( 15 ) ;
438+
439+ var target = $ ( "<div></div>" ) . resizable ( ) ,
440+ target2 = $ ( "<div>" +
441+ "<div class='ui-resizable-handle ui-resizable-e'></div>" +
442+ "<div class='ui-resizable-handle ui-resizable-w'></div>" +
443+ "</div>" ) . resizable ( {
444+ handles : {
445+ "e" : "ui-resizable-e" ,
446+ "w" : "ui-resizable-w"
447+ }
448+ } ) ;
449+
450+ function checkHandles ( target , expectedHandles ) {
442451expectedHandles = $ . map ( expectedHandles , function ( value ) {
443452return ".ui-resizable-" + value ;
444453} ) ;
@@ -451,13 +460,16 @@ QUnit.test( "setOption handles", function( assert ) {
451460} ) ;
452461}
453462
454- checkHandles ( [ "e" , "s" , "se" ] ) ;
463+ checkHandles ( target , [ "e" , "s" , "se" ] ) ;
455464
456465target . resizable ( "option" , "handles" , "n, w, nw" ) ;
457- checkHandles ( [ "n" , "w" , "nw" ] ) ;
466+ checkHandles ( target , [ "n" , "w" , "nw" ] ) ;
458467
459468target . resizable ( "option" , "handles" , "s, w" ) ;
460- checkHandles ( [ "s" , "w" ] ) ;
469+ checkHandles ( target , [ "s" , "w" ] ) ;
470+
471+ target2 . resizable ( "option" , "handles" , "e, s, w" ) ;
472+ checkHandles ( target2 , [ "e" , "s" , "w" ] ) ;
461473} ) ;
462474
463475QUnit . test ( "alsoResize + containment" , function ( assert ) {
0 commit comments