@@ -249,6 +249,7 @@ PanelTest {
249249 }
250250
251251 function init() {
252+ panel.mode = "staged";
252253 panel.fullscreenMode = false;
253254 callManager.foregroundCall = null;
254255
@@ -501,12 +502,10 @@ PanelTest {
501502 function test_tapNearTopEdgeWithPanelInFullscreenMode() {
502503 var indicatorArea = findChild(panel, "indicatorArea");
503504 verify(indicatorArea);
504− var panelPriv = findInvisibleChild(panel, "panelPriv");
505− verify(panelPriv);
506505
507506 panel.fullscreenMode = true;
508507 // wait until if finishes hiding itself
509− tryCompare(indicatorArea, "y", -panelPriv.indicatorHeight);
508+ tryCompare(indicatorArea, "y", -panel.minimizedPanelHeight);
510509
511510 compare(panel.indicators.shown, false);
512511 verify(panel.indicators.fullyClosed);
@@ -563,13 +562,15 @@ PanelTest {
563562
564563 // https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1611959
565564 function test_windowControlButtonsFittsLaw() {
565+ panel.mode = "windowed";
566+ var windowControlArea = findChild(panel, "windowControlArea");
567+ verify(windowControlArea, "Window control area should have been created in windowed mode")
568+
566569 var buttonsVisible = PanelState.decorationsVisible;
567570 PanelState.decorationsVisible = true;
568571 // click in very topleft corner and verify the close button got clicked too
569− wait(1000)
570572 mouseMove(panel, 0, 0);
571573 mouseClick(panel, 0, 0, undefined /*button*/, undefined /*modifiers*/, 100 /*short delay*/);
572− wait(1000)
573574 compare(windowControlButtonsSpy.count, 1);
574575 PanelState.decorationsVisible = buttonsVisible;
575576 }