on xenial help sign in
merge prereq
6354820Michael Zanetti
tests/qmltests/tst_Shell.qml+7−11
@@ -495,16 +495,8 @@ Item {
495 function tapOnAppIconInLauncher() {
495 function tapOnAppIconInLauncher() {
496 var launcherPanel = findChild(shell, "launcherPanel");
496 var launcherPanel = findChild(shell, "launcherPanel");
497
497
498− // pick the first icon, the one at the bottom.
498+ // pick the first icon, the one at the top.
499 var appIcon = findChild(launcherPanel, "launcherDelegate0")
499 var appIcon = findChild(launcherPanel, "launcherDelegate0")
500−
501− // Swipe upwards over the launcher to ensure that this icon
502− // at the bottom is not folded and faded away.
503− var touchStartX = launcherPanel.width / 2;
504− var touchStartY = launcherPanel.height / 2;
505− touchFlick(launcherPanel, touchStartX, touchStartY, touchStartX, 0);
506− tryCompare(launcherPanel, "moving", false);
507−
508 tap(appIcon, appIcon.width / 2, appIcon.height / 2);
500 tap(appIcon, appIcon.width / 2, appIcon.height / 2);
509 }
501 }
510
502
@@ -752,13 +744,17 @@ Item {
752 dragLauncherIntoView();
744 dragLauncherIntoView();
753
745
754 // Emulate a tap with a finger, where the touch position drifts during the tap.
746 // Emulate a tap with a finger, where the touch position drifts during the tap.
747+ // This is to test the touch ownership changes. The tap is happening on the button
748+ // area but then drifting into the left edge drag area. This test makes sure
749+ // the touch ownership stays with the button and doesn't move over to the
750+ // left edge drag area.
755 {
751 {
756 var buttonShowDashHome = findChild(launcher, "buttonShowDashHome");
752 var buttonShowDashHome = findChild(launcher, "buttonShowDashHome");
757 var startPos = buttonShowDashHome.mapToItem(shell,
753 var startPos = buttonShowDashHome.mapToItem(shell,
758− buttonShowDashHome.width * 0.2,
754+ buttonShowDashHome.width * 0.8,
759 buttonShowDashHome.height * 0.2);
755 buttonShowDashHome.height * 0.2);
760 var endPos = buttonShowDashHome.mapToItem(shell,
756 var endPos = buttonShowDashHome.mapToItem(shell,
761− buttonShowDashHome.width * 0.8,
757+ buttonShowDashHome.width * 0.2,
762 buttonShowDashHome.height * 0.8);
758 buttonShowDashHome.height * 0.8);
763 touchFlick(shell, startPos.x, startPos.y, endPos.x, endPos.y);
759 touchFlick(shell, startPos.x, startPos.y, endPos.x, endPos.y);
764 }
760 }