on xenial help sign in
Merge default-wallpaper
commitafff23f3f85a268fc8a7eb531b06ee4d86d7c5d0 authorMichael Terry <michael.terry@canonical.com> dateWed 31 Aug 2016, 14:28 (10 years ago) parent3906ddab09af9b
3 files changed+7−6
qml/Shell.qml+1−1 tests/plugins/ImageCache/CMakeLists.txt+1−1 tests/qmltests/tst_Shell.qml+5−4
qml/Shell.qml+1−1
@@ -156,7 +156,7 @@ StyledItem {
156156 // our default wallpaper). We use a name=wallpaper argument here to
157157 // make sure we don't litter our cache with lots of scaled images. We
158158 // only need to bother caching one at a time.
159− readonly property url cachedBackground: "image://unity8imagecache/" + background + "?name=wallpaper"
159+ readonly property url cachedBackground: background ? "image://unity8imagecache/" + background + "?name=wallpaper" : ""
160160
161161 GSettings {
162162 id: backgroundSettings
tests/plugins/ImageCache/CMakeLists.txt+1−1
@@ -16,5 +16,5 @@ add_executable(ImageCacheTestExec
1616qt5_use_modules(ImageCacheTestExec Core Quick Test)
1717add_unity8_uitest(ImageCache ImageCacheTestExec
1818 DEPENDS ImageCache-qml
19− IMPORT_PATHS ${UNITY_MOCKPATH}
19+ IMPORT_PATHS ${UNITY_PLUGINPATH}
2020 )
tests/qmltests/tst_Shell.qml+5−4
@@ -1344,21 +1344,22 @@ Rectangle {
13441344 var wallpaperResolver = findInvisibleChild(shell, "wallpaperResolver");
13451345 var greeter = findChild(shell, "greeter");
13461346 verify(!greeter.hasCustomBackground);
1347− compare(greeter.background, wallpaperResolver.defaultBackground);
1347+ compare(wallpaperResolver.background, wallpaperResolver.defaultBackground);
13481348
13491349 AccountsService.backgroundFile = Qt.resolvedUrl("../graphics/applicationIcons/dash.png");
13501350 tryCompare(greeter, "hasCustomBackground", true);
1351− compare(greeter.background, AccountsService.backgroundFile);
1351+ compare(wallpaperResolver.background, AccountsService.backgroundFile);
13521352 }
13531353
1354− function test_cachedDefaultBackground() {
1354+ function test_cachedBackground() {
13551355 loadShell("desktop");
13561356 shell.usageScenario = "desktop";
13571357 waitForRendering(shell);
13581358
13591359 var greeter = findChild(shell, "greeter");
13601360 verify(!greeter.hasCustomBackground);
1361− compare(greeter.background.toString().indexOf("image://thumbnailer/file:///"), 0);
1361+ compare(greeter.background.toString().indexOf("image://unity8imagecache/file:///"), 0);
1362+ verify(greeter.background.toString().indexOf("?name=wallpaper") > 0);
13621363 }
13631364
13641365 function test_tapOnRightEdgeReachesApplicationSurface() {