Commit ae30fb6c authored by Aditya Raghavan's avatar Aditya Raghavan Committed by Oleg Gaidarenko

CSS: Add unit tests for negative margins and positioning

Ref 1b932bb7867924b98529537f8ccd35db979ae22a
parent 2c14b00a
...@@ -251,6 +251,21 @@ test("css(String, Object)", function() { ...@@ -251,6 +251,21 @@ test("css(String, Object)", function() {
"Set font shorthand property (#14759)" ); "Set font shorthand property (#14759)" );
}); });
test( "css(String, Object) with negative values", function() {
expect( 4 );
jQuery( "#nothiddendiv" ).css( "margin-top", "-10px" );
jQuery( "#nothiddendiv" ).css( "margin-left", "-10px" );
equal( jQuery( "#nothiddendiv" ).css( "margin-top" ), "-10px", "Ensure negative top margins work." );
equal( jQuery( "#nothiddendiv" ).css( "margin-left" ), "-10px", "Ensure negative left margins work." );
jQuery( "#nothiddendiv" ).css( "position", "absolute" );
jQuery( "#nothiddendiv" ).css( "top", "-20px" );
jQuery( "#nothiddendiv" ).css( "left", "-20px" );
equal( jQuery( "#nothiddendiv" ).css( "top" ), "-20px", "Ensure negative top values work." );
equal( jQuery( "#nothiddendiv" ).css( "left" ), "-20px", "Ensure negative left values work." );
});
test( "css(Array)", function() { test( "css(Array)", function() {
expect( 2 ); expect( 2 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment