@@ -856,8 +856,6 @@ Item {
856 function test_saveRestoreMaximized() {
856 function test_saveRestoreMaximized() {
857 var originalWindowCount = topSurfaceList.count;
857 var originalWindowCount = topSurfaceList.count;
858 var appDelegate = startApplication("dialer-app");
858 var appDelegate = startApplication("dialer-app");
859− var decoratedWindow = findChild(appDelegate, "decoratedWindow");
860− verify(decoratedWindow);
861 compare(topSurfaceList.count, originalWindowCount + 1);
859 compare(topSurfaceList.count, originalWindowCount + 1);
863 var initialWindowX = appDelegate.windowedX;
861 var initialWindowX = appDelegate.windowedX;
@@ -870,14 +868,9 @@ Item {
871 // Now change the state to maximized. The window should not keep updating the stored values
869 // Now change the state to maximized. The window should not keep updating the stored values
872 maximizeAppDelegate(appDelegate);
870 maximizeAppDelegate(appDelegate);
873− decoratedWindow.windowControlButtonsVisible = true;
875 // Close the window and restart the application
872 // Close the window and restart the application
876− var closeButton = findChild(appDelegate, "closeWindowButton");
873+ appDelegate.close();
878− verify(closeButton);
879− mouseClick(closeButton);
881 tryCompare(topSurfaceList, "count", originalWindowCount);
874 tryCompare(topSurfaceList, "count", originalWindowCount);
882 wait(100); // plus some spare room
875 wait(100); // plus some spare room
883 appDelegate = startApplication("dialer-app");
876 appDelegate = startApplication("dialer-app");