add unit test for getStyle where passed object does not have style attribute

This commit is contained in:
John Bintz 2010-01-15 14:00:07 -05:00
parent 2ede0b24e2
commit a36b6d3e76

View File

@ -951,6 +951,9 @@ new Test.Unit.Runner({
// height/width could always be calculated if it's set to "auto" (Firefox)
this.assertNotNull($('auto_dimensions').getStyle('height'));
this.assertNotNull($('auto_dimensions').getStyle('width'));
// assert that using getStyle on an object without a style property returns null
this.assertNull(Element.Methods.getStyle({}, 'width'));
},
testElementGetOpacity: function() {