sleep(2000);
Dimension windowSize = window().size();
ElementInspector content = element("formID:borderLayoutPanel0::content");
int width = content.evalIntExpression("offsetWidth");
int height = content.evalIntExpression("offsetHeight");
content.assertExpressionEquals("offsetWidth", windowSize.width / 2 - 6, 1);
content.assertExpressionEquals("offsetHeight", windowSize.height / 2 - 5, 1);
window().evalExpression("resizeBy(-100, -100)");
sleep(2000);
selenium.waitForCondition("window.document.getElementById('textDiv').innerHTML == \"window resized\"", "10000");