@@ -1720,11 +1720,9 @@ Rectangle {
1720 var appDelegate = appRepeater.itemAt(0);
1720 var appDelegate = appRepeater.itemAt(0);
1721 var maximizeButton = findChild(appDelegate, "maximizeWindowButton");
1721 var maximizeButton = findChild(appDelegate, "maximizeWindowButton");
1724 tryCompare(appDelegate, "state", "normal");
1723 tryCompare(appDelegate, "state", "normal");
1725 tryCompare(PanelState, "buttonsVisible", false)
1724 tryCompare(PanelState, "buttonsVisible", false)
1728 mouseClick(maximizeButton, maximizeButton.width / 2, maximizeButton.height / 2);
1726 mouseClick(maximizeButton, maximizeButton.width / 2, maximizeButton.height / 2);
1729 tryCompare(appDelegate, "state", "maximized");
1727 tryCompare(appDelegate, "state", "maximized");
1730 tryCompare(PanelState, "buttonsVisible", true)
1728 tryCompare(PanelState, "buttonsVisible", true)
@@ -1736,6 +1734,22 @@ Rectangle {
1736 tryCompare(PanelState, "buttonsVisible", true)
1734 tryCompare(PanelState, "buttonsVisible", true)
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);
1743+ var resizeArea = findChild(appDelegate, "windowResizeArea");
1744+ var priv = findInvisibleChild(resizeArea, "priv");
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)
1739 // bug http://pad.lv/1431566
1753 // bug http://pad.lv/1431566
1740 function test_switchToStagedHidesPanelButtons() {
1754 function test_switchToStagedHidesPanelButtons() {
1741 loadDesktopShellWithApps();
1755 loadDesktopShellWithApps();