diff --git a/demos/menubar/default.html b/demos/menubar/default.html
index 79662bd9fd..57a3209ceb 100644
--- a/demos/menubar/default.html
+++ b/demos/menubar/default.html
@@ -3,7 +3,7 @@
jQuery UI Menubar - Default demo
-
+
@@ -13,56 +13,29 @@
-
@@ -160,63 +133,6 @@
-
-
diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js
index ed9fbf9ba0..4c685ebb66 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -54,6 +54,21 @@ $.each( $.effects.effect, function( effect ) {
start();
}));
});
+
+ asyncTest( "relative width & height - properties are preserved", function() {
+ var test = $("div.relWidth.relHeight"),
+ width = test.width(), height = test.height(),
+ cssWidth = test[0].style.width, cssHeight = test[0].style.height;
+
+ expect( 4 );
+ test.toggle( effect, minDuration, function() {
+ equal( test[0].style.width, cssWidth, "Inline CSS Width has been reset after animation ended" );
+ equal( test[0].style.height, cssHeight, "Inline CSS Height has been rest after animation ended" );
+ start();
+ });
+ equal( test.width(), width, "Width is the same px after animation started" );
+ equal( test.height(), height, "Height is the same px after animation started" );
+ });
});
module("animateClass");
diff --git a/tests/unit/effects/effects_scale.js b/tests/unit/effects/effects_scale.js
new file mode 100644
index 0000000000..1436cd0305
--- /dev/null
+++ b/tests/unit/effects/effects_scale.js
@@ -0,0 +1,61 @@
+(function( $ ) {
+module( "effect.scale: Scale" );
+
+function run( position, v, h, vo, ho ) {
+ var desc = "End Position Correct: " + position + " (" + v + "," + h + ") - origin: (" + vo + "," + ho + ")";
+ asyncTest( desc, function() {
+ var test = $( ".testScale" ),
+ css = {
+ position: position
+ },
+ effect = {
+ effect: "scale",
+ mode: "effect",
+ percent: 200,
+ origin: [ vo, ho ],
+ complete: complete,
+ duration: 1
+ },
+ target = {},
+ relative = position === "relative";
+
+ css[ h ] = 33;
+ css[ v ] = 33;
+ target[ h ] = h === ho ? css[ h ] : ho == "center" ? css[ h ] - 35 : css[ h ] - 70;
+ target[ v ] = v === vo ? css[ v ] : vo == "middle" ? css[ v ] - 35 : css[ v ] - 70;
+ if ( relative && h == "right" ) {
+ target[ h ] += 70;
+ }
+ if ( relative && v == "bottom" ) {
+ target[ v ] += 70;
+ }
+ test.css( css );
+ test.effect( effect );
+
+ function complete() {
+ equal( parseInt( test.css( h ), 10 ), target[ h ], "Horizontal Position Correct " + desc );
+ equal( parseInt( test.css( v ), 10 ), target[ v ], "Vertical Position Correct " + desc );
+ start();
+ }
+ });
+}
+
+function suite( position ) {
+ run( position, "top", "left", "top", "left" );
+ run( position, "top", "left", "middle", "center" );
+ run( position, "top", "left", "bottom", "right" );
+ run( position, "bottom", "right", "top", "left" );
+ run( position, "bottom", "right", "middle", "center" );
+ run( position, "bottom", "right", "bottom", "right" );
+}
+
+$(function() {
+ suite( "absolute" );
+ suite( "relative" );
+ $.offset.initialize();
+ if ( $.offset.supportsFixedPosition ) {
+ suite( "fixed" );
+ }
+});
+
+})( jQuery );
diff --git a/tests/unit/position/position.html b/tests/unit/position/position.html
index 4f2e87e080..d71bae4977 100644
--- a/tests/unit/position/position.html
+++ b/tests/unit/position/position.html
@@ -16,47 +16,54 @@
+
-
-
-
-
-
-
-
+
-