@@ -49,35 +49,30 @@ Item {
53− id: backgroundSettings
54− schema.id: "org.gnome.desktop.background"
57 UT.UnityTestCase {
52 UT.UnityTestCase {
58 name: "Shell"
53 name: "Shell"
59 when: windowShown
54 when: windowShown
61−// function initTestCase() {
56+ function initTestCase() {
62−// // swipe away the greeter/lockscreen
57+ // swipe away the greeter/lockscreen
63−// var touchX = shell.width - (shell.edgeSize / 2);
58+ var touchX = shell.width - (shell.edgeSize / 2);
64−// var touchY = shell.height / 2;
59+ var touchY = shell.height / 2;
65−// touchFlick(shell, touchX, touchY, shell.width * 0.1, touchY);
60+ touchFlick(shell, touchX, touchY, shell.width * 0.1, touchY);
67−// var dash = findChild(shell, "dash");
62+ var dash = findChild(shell, "dash");
68−// // wait until the animation has finished
63+ // wait until the animation has finished
69−// tryCompare(dash, "contentScale", 1.0);
64+ tryCompare(dash, "contentScale", 1.0);
70−// tryCompare(dash, "opacity", 1.0);
65+ tryCompare(dash, "opacity", 1.0);
73−// function cleanup() {
68+ function cleanup() {
74−// // kill all (fake) running apps
69+ // kill all (fake) running apps
75−// ApplicationManager.mainStageApplications.clear();
70+ ApplicationManager.mainStageApplications.clear();
76−// ApplicationManager.sideStageApplications.clear();
71+ ApplicationManager.sideStageApplications.clear();
78−// var dashHome = findChild(shell, "DashHome");
73+ var dashHome = findChild(shell, "DashHome");
79−// swipeUntilScopeViewIsReached(dashHome);
74+ swipeUntilScopeViewIsReached(dashHome);
83// Test the effect of a right-edge drag on the dash in 3 situations:
78// Test the effect of a right-edge drag on the dash in 3 situations:
@@ -294,17 +289,15 @@ Item {
294 function test_wallpaper(data) {
289 function test_wallpaper(data) {
295 var backgroundImage = findChild(shell, "backgroundImage")
290 var backgroundImage = findChild(shell, "backgroundImage")
296 GSettingsController.setPictureUri(data.url)
291 GSettingsController.setPictureUri(data.url)
297 tryCompareFunction(function() { return backgroundImage.source.toString().indexOf(data.url) !== -1; }, true)
293 tryCompareFunction(function() { return backgroundImage.source.toString().indexOf(data.url) !== -1; }, true)
298 tryCompare(backgroundImage, "status", Image.Ready)
294 tryCompare(backgroundImage, "status", Image.Ready)
301 function test_wallpaper_wrong() {
297 function test_wallpaper_wrong() {
302 var backgroundImage = findChild(shell, "backgroundImage")
298 var backgroundImage = findChild(shell, "backgroundImage")
303− var oldGSettingsBackground = backgroundSettings.pictureUri
304− var oldShellBackground = shell.background
306 GSettingsController.setPictureUri("wrong")
299 GSettingsController.setPictureUri("wrong")
307− console.log("WRONG ", oldGSettingsBackground, backgroundSettings.pictureUri)
300+ wait(2000)
308 //tryCompareFunction(function() { return oldGSettingsBackground == backgroundSettings.pictureUri; }, true)
301 //tryCompareFunction(function() { return oldGSettingsBackground == backgroundSettings.pictureUri; }, true)
309// tryCompareFunction(function() { return backgroundImage.source.toString().indexOf(data.url) !== -1; }, true)
302// tryCompareFunction(function() { return backgroundImage.source.toString().indexOf(data.url) !== -1; }, true)