aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/offset.js
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2015-05-07 23:16:18 -0400
committerRichard Gibson <richard.gibson@gmail.com>2015-10-18 16:58:38 -0400
commit487d5ca913c237aafe9efa1179749b46382fddbf (patch)
tree80ba81e17553a2076ccc3e49999f533a8ad0ea27 /test/unit/offset.js
parentc752a5030bc00eb5b45dea9c28963f824a5c4f44 (diff)
downloadjquery-487d5ca913c237aafe9efa1179749b46382fddbf.tar.gz
jquery-487d5ca913c237aafe9efa1179749b46382fddbf.zip
CSS: Correct misrepresentation of "auto" horizontal margins as 0
Fixes gh-2237 Closes gh-2276 (cherry picked from commit 214e1634ab9b1d13d53647dd5de3bdf7a091d49c) Conflicts: src/css.js src/css/support.js test/unit/support.js
Diffstat (limited to 'test/unit/offset.js')
-rw-r--r--test/unit/offset.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js
index f0cd47769..85f1da65d 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -186,13 +186,14 @@ testIframe( "offset/absolute", "absolute", function( $, window, document, assert
} );
testIframe( "offset/relative", "relative", function( $, window, document, assert ) {
- assert.expect( 60 );
+ assert.expect( 64 );
// get offset
var tests = [
{ "id": "#relative-1", "top": 7, "left": 7 },
{ "id": "#relative-1-1", "top": 15, "left": 15 },
- { "id": "#relative-2", "top": 142, "left": 27 }
+ { "id": "#relative-2", "top": 142, "left": 27 },
+ { "id": "#relative-2-1", "top": 149, "left": 52 }
];
jQuery.each( tests, function() {
assert.equal( $( this[ "id" ] ).offset().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').offset().top" );
@@ -203,7 +204,8 @@ testIframe( "offset/relative", "relative", function( $, window, document, assert
tests = [
{ "id": "#relative-1", "top": 6, "left": 6 },
{ "id": "#relative-1-1", "top": 5, "left": 5 },
- { "id": "#relative-2", "top": 141, "left": 26 }
+ { "id": "#relative-2", "top": 141, "left": 26 },
+ { "id": "#relative-2-1", "top": 5, "left": 5 }
];
jQuery.each( tests, function() {
assert.equal( $( this[ "id" ] ).position().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').position().top" );