@@ -28,9 +28,10 @@ import Powerd 0.1
29import "../../qml"
29import "../../qml"
33− spacing: 0
33+ width: contentRow.width
34+ height: contentRow.height
35 QtObject {
36 QtObject {
36 id: applicationArguments
37 id: applicationArguments
@@ -48,34 +49,36 @@ Row {
52− id: shellLoader
53+ id: contentRow
54− width: units.gu(40)
55+ Loader {
55− height: units.gu(71)
56+ id: shellLoader
57− property bool itemDestroyed: false
61+ property bool itemDestroyed: false
58− sourceComponent: Component {
62+ sourceComponent: Component {
60− Component.onDestruction: {
64+ Component.onDestruction: {
61− shellLoader.itemDestroyed = true
65+ shellLoader.itemDestroyed = true
67+ maxFailedLogins: maxRetriesTextField.text
63− maxFailedLogins: maxRetriesTextField.text
68− Rectangle {
72+ Rectangle {
69− color: "white"
73+ color: "white"
70− width: units.gu(30)
74+ width: units.gu(30)
71− height: shellLoader.height
75+ height: shellLoader.height
74− anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
78+ anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
75− spacing: units.gu(1)
79+ spacing: units.gu(1)
77− anchors { left: parent.left; right: parent.right }
81+ anchors { left: parent.left; right: parent.right }
79 text: "Show Greeter"
82 text: "Show Greeter"
80 onClicked: {
83 onClicked: {
81 if (shellLoader.status !== Loader.Ready)
84 if (shellLoader.status !== Loader.Ready)
@@ -87,15 +90,15 @@ Row {
93− text: "Max retries:"
95+ text: "Max retries:"
94− color: "black"
96+ color: "black"
96− TextField {
98+ TextField {
97− id: maxRetriesTextField
99+ id: maxRetriesTextField
98− text: "-1"
100+ text: "-1"
@@ -117,6 +120,7 @@ Row {
119 UT.UnityTestCase {
122 UT.UnityTestCase {
120 name: "ShellWithPin"
124 name: "ShellWithPin"
121 when: windowShown
125 when: windowShown
@@ -192,7 +196,7 @@ Row {
192 for (var i = 0; i < pin.length; ++i) {
196 for (var i = 0; i < pin.length; ++i) {
193 var character = pin.charAt(i)
197 var character = pin.charAt(i)
194 var button = findChild(shell, "pinPadButton" + character)
198 var button = findChild(shell, "pinPadButton" + character)
195− mouseClick(button, units.gu(1), units.gu(1))
199+ tap(button)
@@ -253,7 +257,7 @@ Row {
253 var launcher = findChild(shell, "launcher")
257 var launcher = findChild(shell, "launcher")
254 var stage = findChild(shell, "stage")
258 var stage = findChild(shell, "stage")
256− mouseClick(emergencyButton, units.gu(1), units.gu(1))
260+ tap(emergencyButton)
258 tryCompare(greeter, "lockedApp", "dialer-app")
262 tryCompare(greeter, "lockedApp", "dialer-app")
259 tryCompare(greeter, "hasLockedApp", true)
263 tryCompare(greeter, "hasLockedApp", true)
@@ -280,7 +284,7 @@ Row {
280 function test_emergencyCallCrash() {
284 function test_emergencyCallCrash() {
281 var lockscreen = findChild(shell, "lockscreen")
285 var lockscreen = findChild(shell, "lockscreen")
282 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
286 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
283− mouseClick(emergencyButton, units.gu(1), units.gu(1))
287+ tap(emergencyButton)
285 tryCompare(lockscreen, "shown", false)
289 tryCompare(lockscreen, "shown", false)
286 killApps() // kill dialer-app, as if it crashed
290 killApps() // kill dialer-app, as if it crashed
@@ -290,7 +294,7 @@ Row {
290 function test_emergencyCallAppLaunch() {
294 function test_emergencyCallAppLaunch() {
291 var lockscreen = findChild(shell, "lockscreen")
295 var lockscreen = findChild(shell, "lockscreen")
292 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
296 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
293− mouseClick(emergencyButton, units.gu(1), units.gu(1))
297+ tap(emergencyButton)
295 tryCompare(lockscreen, "shown", false)
299 tryCompare(lockscreen, "shown", false)
296 ApplicationManager.startApplication("gallery-app", ApplicationManager.NoFlag)
300 ApplicationManager.startApplication("gallery-app", ApplicationManager.NoFlag)
@@ -335,7 +339,7 @@ Row {
336 var dialog = findChild(root, "infoPopup")
340 var dialog = findChild(root, "infoPopup")
337 var button = findChild(dialog, "infoPopupOkButton")
341 var button = findChild(dialog, "infoPopupOkButton")
338− mouseClick(button, units.gu(1), units.gu(1))
342+ tap(button)
339 tryCompareFunction(function() {return findChild(root, "infoPopup")}, null)
343 tryCompareFunction(function() {return findChild(root, "infoPopup")}, null)
341 tryCompare(resetSpy, "count", 0)
345 tryCompare(resetSpy, "count", 0)