Skip to content

Commit

Permalink
More dimension tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Archibald committed Sep 26, 2010
1 parent 28a08e4 commit 379bb32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/index.html
Expand Up @@ -16,8 +16,11 @@
top: 100px;
left: 100px;
padding-top: 100px;
padding-left: 100px;
border-top: 100px solid #000;
border-left: 100px solid #000;
margin-top: 100px;
margin-left: 100px;
}
</style>
</head>
Expand Down
9 changes: 7 additions & 2 deletions test/test.js
Expand Up @@ -11,9 +11,14 @@ test('css', 7, function() {
strictEqual( $test.css('border-top-width'), '100px', 'border' );
});

test('dimension', 2, function() {
test('dimension', 8, function() {
var $test = $('#positionSizeTest');
strictEqual( $test.width(), 100, 'width' );
strictEqual( $test.height(), 100, 'height' );

strictEqual( $test.innerWidth(), 200, 'innerWidth' );
strictEqual( $test.innerHeight(), 200, 'innerHeight' );
strictEqual( $test.outerWidth(), 300, 'outerWidth' );
strictEqual( $test.outerHeight(), 300, 'outerHeight' );
strictEqual( $test.outerWidth(true), 400, 'outerWidth inc margin' );
strictEqual( $test.outerHeight(true), 400, 'outerHeight inc margin' );
});

0 comments on commit 379bb32

Please sign in to comment.