1 description('Tests offsetWidth using min-width and max-width');
3 function testWidth(style)
5 var div = document.createElement('div');
6 div.setAttribute('style', 'width:100px;' + style);
7 document.body.appendChild(div);
9 var result = div.offsetWidth;
10 document.body.removeChild(div);
14 shouldBe('testWidth("max-width:150px")', '100');
15 shouldBe('testWidth("max-width:50px")', '50');
16 shouldBe('testWidth("min-width:150px")', '150');
17 shouldBe('testWidth("min-width:50px")', '100');