@@ -434,11 +434,20 @@ QUnit.test( "zIndex, applied to all handles", function( assert ) {
434
434
} ) ;
435
435
436
436
QUnit . 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 ) {
442
451
expectedHandles = $ . map ( expectedHandles , function ( value ) {
443
452
return ".ui-resizable-" + value ;
444
453
} ) ;
@@ -451,13 +460,16 @@ QUnit.test( "setOption handles", function( assert ) {
451
460
} ) ;
452
461
}
453
462
454
- checkHandles ( [ "e" , "s" , "se" ] ) ;
463
+ checkHandles ( target , [ "e" , "s" , "se" ] ) ;
455
464
456
465
target . resizable ( "option" , "handles" , "n, w, nw" ) ;
457
- checkHandles ( [ "n" , "w" , "nw" ] ) ;
466
+ checkHandles ( target , [ "n" , "w" , "nw" ] ) ;
458
467
459
468
target . 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" ] ) ;
461
473
} ) ;
462
474
463
475
QUnit . test ( "alsoResize + containment" , function ( assert ) {
0 commit comments