563
564
broadcastHomeSpy.clear();
565
566
GSettingsController.setLifecycleExemptAppids([]);
567
GSettingsController.setPictureUri("");
567
569
// there should be only unity8-dash window over there
568
570
tryCompare(ApplicationManager, "count", 1);
1334
1336
tryCompare(tutorial, "paused", false);
1339
function test_customBackground() {
1340
loadShell("desktop");
1341
shell.usageScenario = "desktop";
1342
waitForRendering(shell);
1344
var wallpaperResolver = findInvisibleChild(shell, "wallpaperResolver");
1345
var greeter = findChild(shell, "greeter");
1346
verify(!greeter.hasCustomBackground);
1347
compare(greeter.background, wallpaperResolver.defaultBackground);
1349
AccountsService.backgroundFile = Qt.resolvedUrl("../graphics/applicationIcons/dash.png");
1350
tryCompare(greeter, "hasCustomBackground", true);
1351
compare(greeter.background, AccountsService.backgroundFile);
1354
function test_cachedDefaultBackground() {
1355
loadShell("desktop");
1356
shell.usageScenario = "desktop";
1357
waitForRendering(shell);
1359
var greeter = findChild(shell, "greeter");
1360
verify(!greeter.hasCustomBackground);
1361
compare(greeter.background.toString().indexOf("image://thumbnailer/file:///"), 0);
1337
1364
function test_tapOnRightEdgeReachesApplicationSurface() {
1338
1365
loadShell("phone");
1339
1366
swipeAwayGreeter();
2435
2462
compare(topmostSurfaceItem.touchReleaseCount, 2);
2465
function test_background_data() {
2468
accounts: Qt.resolvedUrl("data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>"),
2470
output: Qt.resolvedUrl("data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#dd4814'/></svg>")},
2472
{tag: "empty", accounts: "", gsettings: "", output: "defaultBackground"},
2474
{tag: "as-specified",
2475
accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"),
2477
output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
2479
{tag: "gs-specified",
2481
gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"),
2482
output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
2484
{tag: "both-specified",
2485
accounts: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"),
2486
gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"),
2487
output: Qt.resolvedUrl("../data/unity/backgrounds/blue.png")},
2490
accounts: Qt.resolvedUrl("../data/unity/backgrounds/nope.png"),
2491
gsettings: Qt.resolvedUrl("../data/unity/backgrounds/red.png"),
2492
output: Qt.resolvedUrl("../data/unity/backgrounds/red.png")},
2494
{tag: "invalid-both",
2495
accounts: Qt.resolvedUrl("../data/unity/backgrounds/nope.png"),
2496
gsettings: Qt.resolvedUrl("../data/unity/backgrounds/stillnope.png"),
2497
output: "defaultBackground"},
2500
function test_background(data) {
2502
shell.usageScenario = "phone";
2503
waitForRendering(shell);
2505
AccountsService.backgroundFile = data.accounts;
2506
GSettingsController.setPictureUri(data.gsettings);
2508
var wallpaperResolver = findChild(shell, "wallpaperResolver");
2509
if (data.output === "defaultBackground") {
2510
tryCompare(wallpaperResolver, "background", wallpaperResolver.defaultBackground);
2511
verify(!wallpaperResolver.hasCustomBackground);
2513
tryCompare(wallpaperResolver, "background", data.output);
2514
verify(wallpaperResolver.hasCustomBackground);
2438
2518
function test_greeterModeBroadcastsApp() {
2439
2519
setLightDMMockMode("single-pin");
2440
2520
shellLoader.mode = "greeter";