* Test that zero size does not cause exception.
* <p>
* http://fogbugz.instantiations.com/fogbugz/default.asp?47814
*/
public void test_zeroSize() throws Exception {
ComplexPanelInfo panel =
parseJavaInfo(
"// filler filler filler filler filler",
"// filler filler filler filler filler",
"public class Test extends FlowPanel {",
" public Test() {",
" }",
"}");
refresh();
assertNoErrors(panel);
// initially 450x300
{
Image image = panel.getImage();
assertEquals(450, image.getBounds().width);
assertEquals(300, image.getBounds().height);
}
// set -100x-100 size, no exception
{
panel.getTopBoundsSupport().setSize(-100, -100);
refresh();
// however 1x1 image generated
Image image = panel.getImage();
assertEquals(1, image.getBounds().width);
assertEquals(1, image.getBounds().height);
}
}