diff --git a/qml/OrientedShell.qml b/qml/OrientedShell.qml index 5a3404047..bb6228931 100644 --- a/qml/OrientedShell.qml +++ b/qml/OrientedShell.qml @@ -265,6 +265,7 @@ Item { Item { id: shellContainer + objectName: "shellContainer" anchors.fill: parent anchors.topMargin: !unity8Settings.disableTopMargin ? deviceConfiguration.topMargin : 0 diff --git a/tests/qmltests/tst_OrientedShell.qml b/tests/qmltests/tst_OrientedShell.qml index 716141f7c..7b9136661 100644 --- a/tests/qmltests/tst_OrientedShell.qml +++ b/tests/qmltests/tst_OrientedShell.qml @@ -1727,9 +1727,10 @@ Rectangle { * topMargin is specified for the notch. */ var orientedShell = loadShell("has-notch"); + var shellContainer = findChild(orientedShell, "shellContainer"); GSettingsController.setDisableTopMargin(data.disabled); - tryCompare(orientedShell.anchors, "topMargin", data.expectedMargin); + tryCompare(shellContainer.anchors, "topMargin", data.expectedMargin); } } }