Skip to content

Commit

Permalink
added test for box model from adam rofer, support for it will take a …
Browse files Browse the repository at this point in the history
…little elbow grease though
  • Loading branch information
thatcher committed Aug 9, 2010
1 parent 15f7727 commit 2f4d6bd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions specs/css/spec.js
Expand Up @@ -140,3 +140,19 @@ test('adding style element', function() {
//equals(arule.style.toString(), '[object CSSStyleDeclaration]');

});

test('box model', function(){
var div1 = document.createElement('div');
div1.id = "div1";
div1.style.width = "1500px";
div1.style.height = "600px";
document.body.appendChild(div1);

var div2 = document.createElement('div');
div2.id = "div2";
div2.style.width = "100%";
div2.style.height = "100%";
div1.appendChild(div2);

equals(div2.offsetWidth , 1500, 'box model width should be 1500');
});

0 comments on commit 2f4d6bd

Please sign in to comment.