@@ -39,6 +39,7 @@ Item {
3939 Telephony.CallEntry {
4040 id: call3
4141 phoneNumber: "+447812221113"
42+ elapsedTimerRunning: true
4243 }
4344
4445 ActiveCallHint {
@@ -69,6 +70,7 @@ Item {
6970 callManager.foregroundCall = null;
7071 callManager.backgroundCall = null;
7172 callHint.labelSwitchInterval = 300;
73+ call1.elapsedTime = 0;
7274
7375 ApplicationManager.stopApplication("dialer-app");
7476 }
@@ -139,16 +141,27 @@ Item {
139141 compare(contactLabel.text, "Freddy", "Contact label does not match call");
140142 }
141143
142− function test_timeLapse() {
143− callManager.backgroundCall = call3;
144+ function test_timeElapsed_data() {
145+ return [
146+ { tag: "0:00->0:01", elpasedTime: 0, initial: "0:00", expected: "0:01" },
147+ { tag: "0:29->0:30", elpasedTime: 29, initial: "0:29", expected: "0:30" },
148+ { tag: "0:59->1:00", elpasedTime: 59, initial: "0:59", expected: "1:00" },
149+
150+ { tag: "01:59->02:00", elpasedTime: 119, initial: "1:59", expected: "2:00" },
151+ { tag: "59:59->60:00", elpasedTime: 3599, initial: "59:59", expected: "60:00" }
152+ ];
153+ }
154+
155+ function test_timeElapsed(data) {
156+ callManager.backgroundCall = call1;
157+ call1.elapsedTime = data.elpasedTime;
144158
145159 var timeLabel = findChild(callHint, "timeLabel");
146160 verify(timeLabel !== null);
147161
148− var currentLabel = timeLabel.text;
149− tryCompareFunction(function() { return timeLabel.text !== currentLabel }, true);
150− currentLabel = timeLabel.text;
151− tryCompareFunction(function() { return timeLabel.text !== currentLabel }, true);
162+ compare(timeLabel.text, data.initial);
163+ call1.elapsedTime = call1.elapsedTime + 1;
164+ compare(timeLabel.text, data.expected);
152165 }
153166
154167 function test_displayedLabelChangesOverTime() {