@@ -1720,11 +1720,9 @@ Rectangle {
17201720 var appDelegate = appRepeater.itemAt(0);
17211721 var maximizeButton = findChild(appDelegate, "maximizeWindowButton");
17221722
1723− wait(5000)
17241723 tryCompare(appDelegate, "state", "normal");
17251724 tryCompare(PanelState, "buttonsVisible", false)
17261725
1727− wait(5000)
17281726 mouseClick(maximizeButton, maximizeButton.width / 2, maximizeButton.height / 2);
17291727 tryCompare(appDelegate, "state", "maximized");
17301728 tryCompare(PanelState, "buttonsVisible", true)
@@ -1736,6 +1734,22 @@ Rectangle {
17361734 tryCompare(PanelState, "buttonsVisible", true)
17371735 }
17381736
1737+ function test_newAppHasValidGeometry() {
1738+ loadDesktopShellWithApps();
1739+ var appRepeater = findChild(shell, "appRepeater");
1740+ var appId = ApplicationManager.get(0).appId;
1741+ var appDelegate = appRepeater.itemAt(0);
1742+
1743+ var resizeArea = findChild(appDelegate, "windowResizeArea");
1744+ var priv = findInvisibleChild(resizeArea, "priv");
1745+
1746+ // Make sure windows are at 0,0 or greater and they have a size that's > 0
1747+ compare(priv.normalX >= 0, true)
1748+ compare(priv.normalY >= 0, true)
1749+ compare(priv.normalWidth > 0, true)
1750+ compare(priv.normalHeight > 0, true)
1751+ }
1752+
17391753 // bug http://pad.lv/1431566
17401754 function test_switchToStagedHidesPanelButtons() {
17411755 loadDesktopShellWithApps();