"// filler filler filler filler filler",
"// filler filler filler filler filler",
"<ui:UiBinder>",
" <g:FlowPanel/>",
"</ui:UiBinder>");
GraphicalEditPart panelEditPart = canvas.getEditPart(originalPanel);
Figure panelFigure = panelEditPart.getFigure();
// no device yet
assertEquals(new Rectangle(20, 20, 450, 300), panelFigure.getBounds());
// set device
DeviceSelectionSupport.setDevice(originalPanel, DeviceManager.getDevice("generic.qvga"));
assertEquals(new Rectangle(25, 25, 240, 320), panelFigure.getBounds());
}
// parse again
{
openSourcePage();
m_lastContext.getDocument().replace(0, 0, " ");
openDesignPage();
fetchContentFields();
}
// ...still has device
{
assertNotSame(originalPanel, m_contentObject);
GraphicalEditPart panelEditPart = canvas.getEditPart(m_contentObject);
Figure panelFigure = panelEditPart.getFigure();
assertEquals(new Rectangle(25, 25, 240, 320), panelFigure.getBounds());
}
}