Merge lp:~mzanetti/unity8/drop-running-apps-from-dash into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1081
Merged at revision: 1097
Proposed branch: lp:~mzanetti/unity8/drop-running-apps-from-dash
Merge into: lp:unity8
Prerequisite: lp:~unity-team/unity8/mirCompositor
Diff against target: 705 lines (+5/-585)
11 files modified
qml/Dash/Apps/CloseIcon.qml (+0/-62)
qml/Dash/Apps/RunningApplicationTile.qml (+0/-136)
qml/Dash/Apps/RunningApplicationsGrid.qml (+0/-105)
qml/Dash/DashApps.qml (+0/-40)
qml/Dash/DashContent.qml (+1/-3)
qml/Dash/GenericScopeView.qml (+1/-10)
tests/autopilot/unity8/shell/emulators/dash.py (+0/-4)
tests/autopilot/unity8/shell/tests/test_emulators.py (+1/-1)
tests/qmltests/CMakeLists.txt (+0/-1)
tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml (+0/-217)
tests/qmltests/tst_Shell.qml (+2/-6)
To merge this branch: bzr merge lp:~mzanetti/unity8/drop-running-apps-from-dash
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Review via email: mp+227707@code.launchpad.net

Commit message

Drop Recent apps category from Dash

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

see prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?

sure

 * Did you make sure that your branch does not contain spurious tags?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

nope

 * If you changed the UI, has there been a design review?

no real review... but this is wanted by design according to various bug reports and specs.

To post a comment you must log in.
1079. By Michael Zanetti

merge prereq

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1080. By Michael Zanetti

merge prereq

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1081. By Michael Zanetti

merge prereq

Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good to me

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
No, but it is exactly the changes i did when removing this on the non QtComp branch so it looks good

 * Did CI run pass? If not, please explain why.
No, unity8 : Depends: qtdeclarative5-qtmir-plugin (>= 0.4) but it is not installable

1082. By Michael Zanetti

merge prereq

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1083. By Michael Zanetti

merge prereq

1084. By Michael Zanetti

merge prereq

1085. By Michael Zanetti

merge prereq

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1086. By Michael Zanetti

merge prereq

1087. By Michael Zanetti

merge prereq

1088. By Michael Zanetti

merge prereq

1089. By Michael Zanetti

merge prereq

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'qml/Dash/Apps/CloseIcon.qml'
2--- qml/Dash/Apps/CloseIcon.qml 2013-06-05 22:03:08 +0000
3+++ qml/Dash/Apps/CloseIcon.qml 1970-01-01 00:00:00 +0000
4@@ -1,62 +0,0 @@
5-/*
6- * Copyright (C) 2013 Canonical, Ltd.
7- *
8- * This program is free software; you can redistribute it and/or modify
9- * it under the terms of the GNU General Public License as published by
10- * the Free Software Foundation; version 3.
11- *
12- * This program is distributed in the hope that it will be useful,
13- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15- * GNU General Public License for more details.
16- *
17- * You should have received a copy of the GNU General Public License
18- * along with this program. If not, see <http://www.gnu.org/licenses/>.
19- */
20-
21-import QtQuick 2.0
22-
23-Item {
24- id: root
25-
26- Image {
27- id: closeIcon
28- anchors.centerIn: parent
29- source: "graphics/close_btn.png"
30-
31- state: (root.enabled) ? "shown" : "hidden"
32-
33- states: [
34- State {
35- name: "shown"
36- PropertyChanges {
37- target: closeIcon
38- height: root.height
39- width: root.width
40- }
41- },
42- State {
43- name: "hidden"
44- PropertyChanges {
45- target: closeIcon
46- height: 0
47- width: 0
48- }
49- }
50-
51- ]
52- transitions: [
53- Transition {
54- to: "shown"
55- NumberAnimation {
56- properties: "width, height"; duration: 300
57- easing { type: Easing.OutBack; overshoot: 5 }
58- }
59- },
60- Transition {
61- to: "hidden"
62- NumberAnimation { properties: "width, height"; duration: 250; }
63- }
64- ]
65- }
66-}
67
68=== removed file 'qml/Dash/Apps/RunningApplicationTile.qml'
69--- qml/Dash/Apps/RunningApplicationTile.qml 2014-07-28 17:07:14 +0000
70+++ qml/Dash/Apps/RunningApplicationTile.qml 1970-01-01 00:00:00 +0000
71@@ -1,136 +0,0 @@
72-/*
73- * Copyright (C) 2013 Canonical, Ltd.
74- *
75- * This program is free software; you can redistribute it and/or modify
76- * it under the terms of the GNU General Public License as published by
77- * the Free Software Foundation; version 3.
78- *
79- * This program is distributed in the hope that it will be useful,
80- * but WITHOUT ANY WARRANTY; without even the implied warranty of
81- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82- * GNU General Public License for more details.
83- *
84- * You should have received a copy of the GNU General Public License
85- * along with this program. If not, see <http://www.gnu.org/licenses/>.
86- */
87-
88-import QtQuick 2.0
89-import Ubuntu.Components 0.1
90-import Unity.Application 0.1
91-import "../../Components/"
92-import "../../Components/ListItems"
93-
94-AbstractButton {
95- id: root
96- property var application
97-
98- signal requestedApplicationActivation(var application)
99- signal requestedApplicationTermination(var application)
100- signal requestedActivationMode()
101- signal requestedTerminationMode()
102-
103- width: thumbnail.width
104- height: thumbnail.height + labelContainer.height
105-
106- property bool terminationModeEnabled: false
107-
108- onClicked: {
109- if (!terminationModeEnabled)
110- requestedApplicationActivation(application)
111- }
112-
113- onPressAndHold: {
114- if (terminationModeEnabled) {
115- requestedActivationMode()
116- } else {
117- requestedTerminationMode()
118- }
119- }
120-
121- Item {
122- id: thumbnail
123-
124- width: shapedApplicationImage.width
125- height: shapedApplicationImage.height
126-
127- UbuntuShape {
128- id: shapedApplicationImage
129- x: 0
130- y: 0
131- height: applicationImage.height
132- width: applicationImage.width
133- radius: "medium"
134-
135- image: Image {
136- id: applicationImage
137- source: application.screenshot
138- // height : width = ss.height : ss.width
139-
140- property bool isLandscape: sourceSize.width > sourceSize.height
141- property real maxDimension: units.gu(17)
142-
143- width: isLandscape ? Math.min(sourceSize.width, maxDimension) : height * (sourceSize.width / sourceSize.height)
144- height: isLandscape ? width * (sourceSize.height / sourceSize.width) : Math.min(sourceSize.height, maxDimension)
145- fillMode: Image.Stretch
146- }
147-
148- }
149-
150- UbuntuShape {
151- id: borderPressed
152-
153- anchors.fill: shapedApplicationImage
154- radius: "medium"
155- borderSource: "radius_pressed.sci"
156- opacity: root.pressed ? 1.0 : 0.0
157- Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
158- }
159- }
160-
161- // FIXME: label code duplicated with Tile
162- Item {
163- id: labelContainer
164- anchors {
165- left: thumbnail.left
166- right: thumbnail.right
167- top: thumbnail.bottom
168- }
169- height: units.gu(2)
170-
171- Label {
172- id: label
173- anchors {
174- baseline: parent.bottom
175- left: parent.left
176- right: parent.right
177- }
178- text: (application) ? application.name : ""
179-
180- // TODO karni: Update Ubuntu.Components.Themes.Palette and use theme color instead
181- color: "grey"
182- opacity: 0.9
183- fontSize: "small"
184- elide: Text.ElideMiddle
185- horizontalAlignment: Text.AlignHCenter
186- }
187- }
188-
189- CloseIcon {
190- objectName: "closeIcon " + model.name
191- anchors {
192- left: thumbnail.left
193- leftMargin: -units.gu(1)
194- top: thumbnail.top
195- topMargin: -units.gu(1)
196- }
197- height: units.gu(6)
198- width: units.gu(6)
199- id: closeIcon
200- enabled: root.terminationModeEnabled
201-
202- MouseArea {
203- anchors { fill: parent; margins: -units.gu(1) }
204- onClicked: requestedApplicationTermination(application)
205- }
206- }
207-}
208
209=== removed file 'qml/Dash/Apps/RunningApplicationsGrid.qml'
210--- qml/Dash/Apps/RunningApplicationsGrid.qml 2014-03-25 11:34:34 +0000
211+++ qml/Dash/Apps/RunningApplicationsGrid.qml 1970-01-01 00:00:00 +0000
212@@ -1,105 +0,0 @@
213-/*
214- * Copyright (C) 2013 Canonical, Ltd.
215- *
216- * This program is free software; you can redistribute it and/or modify
217- * it under the terms of the GNU General Public License as published by
218- * the Free Software Foundation; version 3.
219- *
220- * This program is distributed in the hope that it will be useful,
221- * but WITHOUT ANY WARRANTY; without even the implied warranty of
222- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
223- * GNU General Public License for more details.
224- *
225- * You should have received a copy of the GNU General Public License
226- * along with this program. If not, see <http://www.gnu.org/licenses/>.
227- */
228-
229-import QtQuick 2.0
230-import "../../Components"
231-
232-import Ubuntu.Gestures 0.1
233-import Unity.Application 0.1
234-
235-ResponsiveFlowView {
236- id: root
237- clip: true
238-
239- signal updateScreenshots
240- property alias enableHeightBehavior: heightBehaviour.enabled
241- property bool enableHeightBehaviorOnNextCreation: model.count === 0
242-
243- Behavior on height {
244- id: heightBehaviour
245- enabled: false
246- NumberAnimation { duration: 200; easing.type: Easing.InOutQuad }
247- }
248-
249- Connections {
250- target: root.model
251- onCountChanged: {
252- heightBehaviour.enabled = true;
253- }
254- }
255-
256- property bool canEnableTerminationMode: true
257-
258- onCanEnableTerminationModeChanged: {
259- if (!canEnableTerminationMode)
260- terminationModeEnabled = false
261- }
262-
263- // when false, it means it's on activation mode
264- property bool terminationModeEnabled: false
265-
266- maximumNumberOfColumns: 10
267- minimumHorizontalSpacing: units.gu(2)
268- referenceDelegateWidth: units.gu(11)
269- verticalSpacing: units.gu(2)
270-
271- delegate: Item {
272- width: runningAppTile.width + root.horizontalSpacing
273- height: runningAppTile.height + root.verticalSpacing
274-
275- RunningApplicationTile {
276- id: runningAppTile
277- objectName: "runningAppTile " + model.name
278- anchors {
279- top: parent.top
280- horizontalCenter: parent.horizontalCenter
281- }
282- application: model
283- onRequestedActivationMode: { root.terminationModeEnabled = false }
284- onRequestedTerminationMode: {
285- if (canEnableTerminationMode)
286- root.terminationModeEnabled = true
287- }
288- onRequestedApplicationTermination: {
289- ApplicationManager.stopApplication(model.appId)
290- }
291- onRequestedApplicationActivation: {
292- ApplicationManager.requestFocusApplication(model.appId)
293- }
294-
295- terminationModeEnabled: root.terminationModeEnabled
296- }
297- }
298-
299- move: Transition {
300- NumberAnimation { properties: "x,y"; duration: 400; easing.type: Easing.OutCubic }
301- }
302-
303- MouseArea {
304- anchors.fill: parent
305- z: -1 // behind all RunningApplicationTiles
306- enabled: root.terminationModeEnabled
307- onPressed: { root.terminationModeEnabled = false; }
308- }
309-
310- PressedOutsideNotifier {
311- anchors.fill: parent
312- enabled: root.terminationModeEnabled
313- onPressedOutside: {
314- root.terminationModeEnabled = false;
315- }
316- }
317-}
318
319=== removed directory 'qml/Dash/Apps/graphics'
320=== removed file 'qml/Dash/Apps/graphics/close_btn@9.png'
321Binary files qml/Dash/Apps/graphics/close_btn@9.png 2013-06-20 13:42:39 +0000 and qml/Dash/Apps/graphics/close_btn@9.png 1970-01-01 00:00:00 +0000 differ
322=== removed file 'qml/Dash/DashApps.qml'
323--- qml/Dash/DashApps.qml 2014-03-28 00:32:46 +0000
324+++ qml/Dash/DashApps.qml 1970-01-01 00:00:00 +0000
325@@ -1,40 +0,0 @@
326-/*
327- * Copyright (C) 2013 Canonical, Ltd.
328- *
329- * This program is free software; you can redistribute it and/or modify
330- * it under the terms of the GNU General Public License as published by
331- * the Free Software Foundation; version 3.
332- *
333- * This program is distributed in the hope that it will be useful,
334- * but WITHOUT ANY WARRANTY; without even the implied warranty of
335- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
336- * GNU General Public License for more details.
337- *
338- * You should have received a copy of the GNU General Public License
339- * along with this program. If not, see <http://www.gnu.org/licenses/>.
340- */
341-
342-import QtQuick 2.0
343-import Ubuntu.Components 0.1
344-import Utils 0.1
345-import Unity.Application 0.1
346-import "../Components"
347-import "../Components/ListItems"
348-import "Apps"
349-
350-GenericScopeView {
351- id: scopeView
352- objectName: "DashApps"
353-
354- property var runningApps: ApplicationManager
355-
356- QtObject {
357- id: countObject
358- property int count: scopeView.scope.searchQuery.length == 0 ? scopeView.runningApps.count : 0
359- }
360-
361- onScopeChanged: {
362- scopeView.scope.categories.addSpecialCategory("running.apps.category", i18n.tr("Recent"), "", "{ \"template\": { \"category-layout\": \"running-apps\" } }", countObject);
363- enableHeightBehaviorOnNextCreation = scopeView.runningApps.count === 0
364- }
365-}
366
367=== modified file 'qml/Dash/DashContent.qml'
368--- qml/Dash/DashContent.qml 2014-07-28 17:07:14 +0000
369+++ qml/Dash/DashContent.qml 2014-07-28 17:07:15 +0000
370@@ -126,9 +126,7 @@
371 return (xPositionRelativetoView > -width && xPositionRelativetoView < width) ? 1 : 0
372 }
373 asynchronous: true
374- // TODO This if will eventually go away since we're killing DashApps.qml
375- // once we move app closing to the spread
376- source: (scope.id == "clickscope") ? "DashApps.qml" : "GenericScopeView.qml"
377+ source: "GenericScopeView.qml"
378 objectName: scope.id + " loader"
379
380 readonly property bool moving: item ? item.moving : false
381
382=== modified file 'qml/Dash/GenericScopeView.qml'
383--- qml/Dash/GenericScopeView.qml 2014-07-24 20:40:44 +0000
384+++ qml/Dash/GenericScopeView.qml 2014-07-28 17:07:15 +0000
385@@ -18,7 +18,6 @@
386 import Ubuntu.Components 0.1
387 import Utils 0.1
388 import Unity 0.2
389-import Unity.Application 0.1
390 import Dash 0.1
391 import "../Components"
392 import "../Components/ListItems" as ListItems
393@@ -194,7 +193,6 @@
394 switch (cardTool.categoryLayout) {
395 case "carousel": return "CardCarousel.qml";
396 case "vertical-journal": return "CardVerticalJournal.qml";
397- case "running-apps": return "Apps/RunningApplicationsGrid.qml";
398 case "grid":
399 default: return "CardGrid.qml";
400 }
401@@ -205,14 +203,7 @@
402 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
403 scopeView.enableHeightBehaviorOnNextCreation = false;
404 }
405- if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
406- // TODO: this is still a kludge :D Ideally add some kind of hook so that we
407- // can do this from DashApps.qml or think a better way that needs no special casing
408- item.model = Qt.binding(function() { return runningApps; })
409- item.canEnableTerminationMode = Qt.binding(function() { return scopeView.isCurrent })
410- } else {
411- item.model = Qt.binding(function() { return results })
412- }
413+ item.model = Qt.binding(function() { return results })
414 item.objectName = Qt.binding(function() { return categoryId })
415 item.scopeStyle = scopeView.scopeStyle;
416 if (baseItem.expandable) {
417
418=== modified file 'tests/autopilot/unity8/shell/emulators/dash.py'
419--- tests/autopilot/unity8/shell/emulators/dash.py 2014-07-25 10:47:19 +0000
420+++ tests/autopilot/unity8/shell/emulators/dash.py 2014-07-28 17:07:15 +0000
421@@ -188,10 +188,6 @@
422 raise emulators.UnityEmulatorException(
423 'No category found with name {}'.format(category))
424
425-
426-class DashApps(GenericScopeView):
427- """Autopilot emulator for the applications scope."""
428-
429 def get_applications(self, category):
430 """Return the list of applications on a category.
431
432
433=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
434--- tests/autopilot/unity8/shell/tests/test_emulators.py 2014-07-24 14:45:36 +0000
435+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2014-07-28 17:07:15 +0000
436@@ -142,7 +142,7 @@
437 scope_id = 'clickscope'
438 scope = self.dash.open_scope(scope_id)
439 self._assert_scope_is_opened(scope, scope_id)
440- self.assertIsInstance(scope, dash_emulators.DashApps)
441+ self.assertIsInstance(scope, dash_emulators.GenericScopeView)
442
443
444 class GenericScopeViewEmulatorTestCase(DashBaseTestCase):
445
446=== modified file 'tests/qmltests/CMakeLists.txt'
447--- tests/qmltests/CMakeLists.txt 2014-07-21 23:38:11 +0000
448+++ tests/qmltests/CMakeLists.txt 2014-07-28 17:07:15 +0000
449@@ -40,7 +40,6 @@
450 add_qml_benchmark(Dash CardBenchmark 1000)
451 add_qml_test(Dash CardTool)
452 add_qml_test(Dash GenericScopeView)
453-add_qml_test(Dash/Apps RunningApplicationsGrid)
454 add_qml_test(Dash/Previews Preview)
455 add_qml_test(Dash/Previews PreviewActions)
456 add_qml_test(Dash/Previews PreviewAudioPlayback)
457
458=== removed file 'tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml'
459--- tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml 2014-07-28 17:07:14 +0000
460+++ tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml 1970-01-01 00:00:00 +0000
461@@ -1,217 +0,0 @@
462-/*
463- * Copyright 2013 Canonical Ltd.
464- *
465- * This program is free software; you can redistribute it and/or modify
466- * it under the terms of the GNU General Public License as published by
467- * the Free Software Foundation; version 3.
468- *
469- * This program is distributed in the hope that it will be useful,
470- * but WITHOUT ANY WARRANTY; without even the implied warranty of
471- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
472- * GNU General Public License for more details.
473- *
474- * You should have received a copy of the GNU General Public License
475- * along with this program. If not, see <http://www.gnu.org/licenses/>.
476- */
477-
478-import QtQuick 2.0
479-import QtTest 1.0
480-import "../../../../qml/Dash/Apps"
481-import Unity.Test 0.1 as UT
482-import Unity.Application 0.1
483-import Ubuntu.Components 1.1
484-
485-// Using Rectangle to have an opaque surface because AppManager paints app surfaces behind it.
486-Rectangle {
487- width: units.gu(70)
488- height: units.gu(40)
489-
490- function resetRunningApplications() {
491- while (ApplicationManager.count > 0) {
492- ApplicationManager.stopApplication(ApplicationManager.get(0).appId)
493- }
494-
495- ApplicationManager.startApplication("dialer-app");
496- ApplicationManager.startApplication("webbrowser-app");
497- }
498-
499- Component.onCompleted: {
500- resetRunningApplications()
501- }
502-
503- // The component under test
504- RunningApplicationsGrid {
505- id: runningApplicationsGrid
506- orientationAngle: orientationAngleSelector.selectedIndex * 90
507- anchors.left: parent.left
508- anchors.right: controlPanel.left
509- anchors.top: parent.top
510- anchors.bottom: parent.bottom
511- model: ApplicationManager
512- }
513-
514- Rectangle {
515- id: controlPanel
516- anchors.right: parent.right
517- anchors.top: parent.top
518- anchors.bottom: parent.bottom
519- width: units.gu(20)
520- color: "black"
521-
522- OptionSelector {
523- id: orientationAngleSelector
524- model: ["0","90","180","270"]
525- text: "Orientation Angle"
526- width: parent.width
527- }
528- }
529-
530- UT.UnityTestCase {
531- name: "RunningApplicationsGrid"
532- when: windowShown
533-
534- function init() {
535- runningApplicationsGrid.terminationModeEnabled = false
536- resetRunningApplications()
537- }
538-
539- property var browserTile
540- property var phoneTile
541-
542- property var isBrowserLongPressed: false
543- function onBrowserLongPressed() {isBrowserLongPressed = true}
544-
545- property var isPhoneLongPressed: false
546- function onPhoneLongPressed() {isPhoneLongPressed = true}
547-
548- // Tiles should go to termination mode when any one of them is long-pressed.
549- // Long-pressing when they're in termination mode brings them back to activation mode
550- function test_enterTerminationMode() {
551- browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser")
552- verify(browserTile != undefined)
553- browserTile.onPressAndHold.connect(onBrowserLongPressed)
554-
555- phoneTile = findChild(runningApplicationsGrid, "runningAppTile Dialer")
556- verify(phoneTile != undefined)
557- phoneTile.onPressAndHold.connect(onPhoneLongPressed)
558-
559- compare(browserTile.terminationModeEnabled, false)
560- compare(phoneTile.terminationModeEnabled, false)
561- compare(runningApplicationsGrid.terminationModeEnabled, false)
562-
563- isBrowserLongPressed = false
564- mousePress(browserTile, browserTile.width/2, browserTile.height/2)
565- tryCompareFunction(checkSwitchToTerminationModeAfterLongPress, true)
566-
567- mouseRelease(browserTile, browserTile.width/2, browserTile.height/2)
568-
569- compare(browserTile.terminationModeEnabled, true)
570- compare(phoneTile.terminationModeEnabled, true)
571- compare(runningApplicationsGrid.terminationModeEnabled, true)
572-
573- isPhoneLongPressed = false
574- mousePress(phoneTile, phoneTile.width/2, phoneTile.height/2)
575- tryCompareFunction(checkSwitchToActivationModeAfterLongPress, true)
576-
577- mouseRelease(phoneTile, phoneTile.width/2, phoneTile.height/2)
578-
579- compare(browserTile.terminationModeEnabled, false)
580- compare(phoneTile.terminationModeEnabled, false)
581- compare(runningApplicationsGrid.terminationModeEnabled, false)
582-
583- browserTile.onPressAndHold.disconnect(onBrowserLongPressed)
584- phoneTile.onPressAndHold.disconnect(onPhoneLongPressed)
585- }
586-
587- // Checks that components swicth to termination mode after (and only after) a long
588- // press happens on Browser tile.
589- function checkSwitchToTerminationModeAfterLongPress() {
590- compare(browserTile.terminationModeEnabled, isBrowserLongPressed)
591- compare(phoneTile.terminationModeEnabled, isBrowserLongPressed)
592- compare(runningApplicationsGrid.terminationModeEnabled, isBrowserLongPressed)
593-
594- return isBrowserLongPressed &&
595- browserTile.terminationModeEnabled &&
596- phoneTile.terminationModeEnabled &&
597- runningApplicationsGrid.terminationModeEnabled
598- }
599-
600- // Checks that components swicth to activation mode after (and only after) a long
601- // press happens on Phone tile.
602- function checkSwitchToActivationModeAfterLongPress() {
603- compare(browserTile.terminationModeEnabled, !isPhoneLongPressed)
604- compare(phoneTile.terminationModeEnabled, !isPhoneLongPressed)
605- compare(runningApplicationsGrid.terminationModeEnabled, !isPhoneLongPressed)
606-
607- return isPhoneLongPressed &&
608- !browserTile.terminationModeEnabled &&
609- !phoneTile.terminationModeEnabled &&
610- !runningApplicationsGrid.terminationModeEnabled
611- }
612-
613- // While on termination mode, clicking a running application tile, outside of
614- // the close icon should do nothing
615- function test_clickTileNotClose() {
616- runningApplicationsGrid.terminationModeEnabled = true
617-
618- var browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser")
619- verify(browserTile != undefined)
620-
621- verify(ApplicationManager.findApplication("webbrowser-app") !== null)
622-
623- mouseClick(browserTile, browserTile.width/2, browserTile.height/2)
624-
625- verify(ApplicationManager.findApplication("webbrowser-app") !== null)
626-
627- // The tile for the Browser app should stay there
628- tryCompareFunction(checkBrowserTileExists, true)
629- }
630-
631- // While in termination mode, clicking on a running application tile's close icon
632- // causes the corresponding application to be terminated
633- function test_clickCloseIconToTerminateApp() {
634- runningApplicationsGrid.terminationModeEnabled = true
635-
636- var browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser")
637- var browserTileCloseButton = findChild(runningApplicationsGrid, "closeIcon Browser")
638-
639- verify(browserTile != undefined)
640- verify(browserTileCloseButton != undefined)
641- verify(ApplicationManager.findApplication("webbrowser-app") !== 0)
642-
643- mouseClick(browserTileCloseButton, browserTileCloseButton.width/2, browserTileCloseButton.height/2)
644- wait(0) // spin event loop to start any pending animation
645-
646- verify(ApplicationManager.findApplication("webbrowser-app") === null)
647-
648- // The tile for the Browser app should eventually vanish since the
649- // application has been terminated.
650- tryCompareFunction(checkBrowserTileExists, false)
651- }
652-
653- function checkBrowserTileExists() {
654- return findChild(runningApplicationsGrid, "runningAppTile Browser")
655- != undefined
656- }
657-
658- // While in termination mode, if you click outside any of the tiles, the
659- // termination mode is disabled (i.e. we switch back to activation mode).
660- function test_clickOutsideTilesDisablesTerminationMode() {
661- runningApplicationsGrid.terminationModeEnabled = true
662-
663- var browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser")
664- verify(browserTile != undefined)
665-
666- verify(runningApplicationsGrid.terminationModeEnabled);
667-
668- // Click on the bottom right corner of the grid, where there's no
669- // RunningApplicationTile lying around
670- mouseClick(runningApplicationsGrid,
671- runningApplicationsGrid.width - 1, runningApplicationsGrid.height - 1);
672-
673- wait(0) // spin event loop to ensure that any pending signal emission went through
674-
675- verify(!runningApplicationsGrid.terminationModeEnabled);
676- }
677- }
678-}
679
680=== modified file 'tests/qmltests/tst_Shell.qml'
681--- tests/qmltests/tst_Shell.qml 2014-07-28 17:07:14 +0000
682+++ tests/qmltests/tst_Shell.qml 2014-07-28 17:07:15 +0000
683@@ -313,9 +313,9 @@
684 - perform long left edge swipe to go minimize the app and go back to the dash.
685
686 Expected Results
687- - apps lens shown and Running Apps visible on screen
688+ - apps lens shown
689 */
690- function test_minimizingAppTakesToRunningApps() {
691+ function test_minimizingAppTakesToDashApps() {
692 var dashApps = findChild(shell, "clickscope");
693 swipeUntilScopeViewIsReached(dashApps);
694
695@@ -353,10 +353,6 @@
696 tryCompare(appsCategoryListView, "moving", false);
697
698 verify(itemIsOnScreen(dashApps));
699-
700- var runningApplicationsGrid = findChild(appsCategoryListView, "running.apps.category");
701- verify(runningApplicationsGrid);
702- verify(itemIsOnScreen(runningApplicationsGrid));
703 }
704
705 function test_showInputMethod() {

Subscribers

People subscribed via source and target branches