@@ -19,6 +19,7 @@
20import QtQuick 2.0
20import QtQuick 2.0
21import QtTest 1.0
21import QtTest 1.0
22+import AccountsService 0.1
22import GSettings 1.0
23import GSettings 1.0
23import LightDM 0.1 as LightDM
24import LightDM 0.1 as LightDM
24import Ubuntu.Components 1.1
25import Ubuntu.Components 1.1
@@ -779,8 +780,8 @@ Item {
780 function test_background_data() {
781 function test_background_data() {
782− {tag: "color", accounts: "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>", gsettings: "", output: "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>"},
783+ {tag: "color", accounts: Qt.resolvedUrl("data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>"), gsettings: "", output: Qt.resolvedUrl("data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>")},
783− {tag: "empty", accounts: "", gsettings: "", output: ""},
784+ {tag: "empty", accounts: "", gsettings: "", output: shell.defaultBackground},
784 {tag: "as-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: "", output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
785 {tag: "as-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: "", output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
785 {tag: "gs-specified", accounts: "", gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
786 {tag: "gs-specified", accounts: "", gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
786 {tag: "both-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
787 {tag: "both-specified", accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
@@ -790,9 +791,9 @@ Item {
791 function test_background(data) {
792 function test_background(data) {
792 AccountsService.backgroundFile = data.accounts;
793 AccountsService.backgroundFile = data.accounts;
793− var backgroundSettings = findChild(shell, "backgroundSettings");
794+ var backgroundSettings = findInvisibleChild(shell, "backgroundSettings");
794 backgroundSettings.pictureUri = data.gsettings;
795 backgroundSettings.pictureUri = data.gsettings;
795− tryCompare(shell.background, data.output);
796+ tryCompare(shell, "background", data.output);