on xenial help sign in
merge trunk
commit6b3d47bad39052995186d7ec5e1dc1b189b3dd52 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 15 Oct 2013, 14:28 (13 years ago) parent6c7b4d5b476889
14 files changed+196−46
Components/FilterGrid.qml+2−2 Components/LazyImage.qml+2−2 Dash/Apps/RunningApplicationTile.qml+7−3 Dash/Music/MusicTileStyle.qml+1 Dash/Video/VideoTileStyle.qml+1 Shell.qml+2−1 data/unity8.conf+9 debian/changelog+6 debian/control+1 debian/unity8.install+1 plugins/Unity/categories.cpp+3−1 tests/autopilot/unity8/shell/tests/__init__.py+110−10 tests/qmltests/Components/tst_LazyImage.qml+27−23 tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+24−4
Components/FilterGrid.qml+2−2
@@ -69,7 +69,7 @@ Item {
6969 height: !filterAnimation.running ? childrenRect.height : height
7070 clip: filterAnimation.running
7171
72− SmoothedAnimation {
72+ NumberAnimation {
7373 property bool filterEndValue
7474 id: filterAnimation
7575 target: root
@@ -78,7 +78,7 @@ Item {
7878 // Duration and easing here match the ListViewWithPageHeader::m_contentYAnimation
7979 // otherwise since both animations can run at the same time you'll get
8080 // some visual weirdness.
81− velocity: units.gu(100)
81+ duration: 200
8282 easing.type: Easing.InOutQuad
8383 onStopped: {
8484 root.filter = filterEndValue;
Components/LazyImage.qml+2−2
@@ -27,8 +27,8 @@ Item {
2727 // TODO convert into enums when available in QML
2828 property string scaleTo
2929
30− property real initialWidth: units.gu(10)
31− property real initialHeight: units.gu(10)
30+ property real initialWidth: scaleTo == "width" || scaleTo == "fit" ? width : units.gu(10)
31+ property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
3232
3333 property alias sourceSize: image.sourceSize
3434 property alias fillMode: image.fillMode
Dash/Apps/RunningApplicationTile.qml+7−3
@@ -39,9 +39,7 @@ AbstractButton {
3939 property bool terminationModeEnabled: false
4040
4141 onClicked: {
42− if (terminationModeEnabled)
43− requestedApplicationTermination(application)
44− else
42+ if (!terminationModeEnabled)
4543 requestedApplicationActivation(application)
4644 }
4745
@@ -123,6 +121,7 @@ AbstractButton {
123121 }
124122
125123 CloseIcon {
124+ objectName: "closeIcon " + model.name
126125 anchors {
127126 left: shapedApplicationImage.left
128127 leftMargin: -units.gu(1)
@@ -133,5 +132,10 @@ AbstractButton {
133132 width: units.gu(6)
134133 id: closeIcon
135134 enabled: root.terminationModeEnabled
135+
136+ MouseArea {
137+ anchors { fill: parent; margins: -units.gu(1) }
138+ onClicked: requestedApplicationTermination(application)
139+ }
136140 }
137141}
Dash/Music/MusicTileStyle.qml+1
@@ -66,6 +66,7 @@ Item {
6666 left: icon.left
6767 right: parent.right
6868 rightMargin: units.gu(1)
69+ leftMargin: units.dp(2)
6970 }
7071
7172 color: Theme.palette.selected.backgroundText
Dash/Video/VideoTileStyle.qml+1
@@ -70,6 +70,7 @@ Item {
7070 left: icon.left
7171 right: parent.right
7272 rightMargin: units.gu(1)
73+ leftMargin: units.dp(2)
7374 }
7475
7576 color: Theme.palette.selected.backgroundText
Shell.qml+2−1
@@ -579,7 +579,7 @@ FocusScope {
579579 contentEnabled: edgeDemo.panelContentEnabled
580580 }
581581 fullscreenMode: shell.fullscreenMode
582− searchVisible: !greeter.shown && !lockscreen.shown
582+ searchVisible: !greeter.shown && !lockscreen.shown && dash.shown
583583
584584 InputFilterArea {
585585 anchors {
@@ -737,6 +737,7 @@ FocusScope {
737737 }
738738
739739 OSKController {
740+ anchors.topMargin: panel.panelHeight
740741 anchors.fill: parent // as needs to know the geometry of the shell
741742 }
742743
data/unity8.confnew file+9
@@ -0,0 +1,9 @@
1+description "Unity Shell v8"
2+author "Ricardo Mendoza <ricmm@ubuntu.com>"
3+
4+start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=ubuntu-touch-surfaceflinger)) and started dbus
5+stop on desktop-end
6+
7+respawn
8+
9+exec ${BINARY:-unity8} $ARGS
debian/changelog+6
@@ -1,3 +1,9 @@
1+unity8 (7.83) UNRELEASED; urgency=low
2+
3+ * Replace ubuntu-touch-session's unity8.conf upstart job.
4+
5+ -- Michał Sawicz <michal.sawicz@canonical.com> Tue, 15 Oct 2013 01:12:45 +0200
6+
17unity8 (7.82+13.10.20131011.2-0ubuntu1) saucy; urgency=low
28
39 [ Michał Sawicz ]
debian/control+1
@@ -82,6 +82,7 @@ Depends: gsettings-desktop-schemas,
8282 ${shlibs:Depends},
8383Recommends: ${unity-default-masterscopes},
8484Breaks: indicator-network (<< 0.5.1)
85+Replaces: ubuntu-touch-session (<< 0.82~)
8586Description: Unity 8 shell
8687 The Unity 8 shell is the primary user interface for Ubuntu devices.
8788
debian/unity8.install+1
@@ -13,3 +13,4 @@ usr/share/unity8/Panel
1313usr/share/unity8/Shell.qml
1414usr/share/unity8/SideStage
1515usr/share/unity8/graphics
16+data/unity8.conf usr/share/upstart/sessions/
plugins/Unity/categories.cpp+3−1
@@ -131,7 +131,9 @@ Categories::setUnityScope(const unity::dash::Scope::Ptr& scope)
131131
132132 m_signals.disconnectAll();
133133 m_signals << m_unityScope->categories()->model.changed.connect(sigc::mem_fun(this, &Categories::onCategoriesModelChanged));
134− m_signals << m_unityScope->category_order.changed.connect(sigc::mem_fun(this, &Categories::onCategoryOrderChanged));
134+
135+ // FIXME: Don't handle category order changes for now as it causes UI issues (https://bugs.launchpad.net/unity8/+bug/1239584).
136+ //m_signals << m_unityScope->category_order.changed.connect(sigc::mem_fun(this, &Categories::onCategoryOrderChanged));
135137}
136138
137139void
tests/autopilot/unity8/shell/tests/__init__.py+110−10
@@ -28,9 +28,12 @@ from autopilot.platform import model
2828from autopilot.testcase import AutopilotTestCase
2929from autopilot.matchers import Eventually
3030from autopilot.input import Touch
31+from autopilot.introspection import get_proxy_object_for_existing_process
3132from autopilot.display import Display
3233import logging
3334import os.path
35+import subprocess
36+import sys
3437from testtools.matchers import Equals, NotEquals
3538
3639from unity8 import (
@@ -51,6 +54,7 @@ UNITYSHELL_GSETTINGS_PATH = "/org/compiz/profiles/unity/plugins/unityshell/"
5154UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
5255UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
5356
57+
5458def _get_device_emulation_scenarios(devices='All'):
5559 nexus4 = ('Desktop Nexus 4',
5660 dict(app_width=768, app_height=1280, grid_unit_px=18))
@@ -67,14 +71,43 @@ def _get_device_emulation_scenarios(devices='All'):
6771 elif devices == 'Nexus10':
6872 return [nexus10]
6973 else:
70− raise RuntimeException('Unrecognized device-option "%s" passed.' % devices)
74+ raise RuntimeError(
75+ 'Unrecognized device-option "%s" passed.' % devices
76+ )
7177 else:
7278 return [native]
7379
80+
7481class UnityTestCase(AutopilotTestCase):
7582
7683 """A test case base class for the Unity shell tests."""
7784
85+ @classmethod
86+ def setUpClass(cls):
87+ try:
88+ output = subprocess.check_output([
89+ "/sbin/initctl",
90+ "status",
91+ "unity8"
92+ ], stderr=subprocess.STDOUT)
93+ except subprocess.CalledProcessError, e:
94+ sys.stderr.write(
95+ "Error: `initctl status unity8` failed, most probably the unity8 session could not be found:\n\n"
96+ "{0}\n"
97+ "Please install unity8 or copy data/unity8.conf to {1}\n".format(
98+ e.output,
99+ os.path.join(os.getenv("XDG_CONFIG_HOME", os.path.join(os.getenv("HOME"), ".config")), "upstart")
100+ ))
101+ sys.exit(1)
102+
103+ if "start/" in output:
104+ sys.stderr.write(
105+ "Error: Unity is currently running, these tests require it to be 'stopped'.\n"
106+ "Please run this command before running these tests: \n"
107+ "initctl stop unity8\n"
108+ )
109+ sys.exit(2)
110+
78111 def setUp(self):
79112 super(UnityTestCase, self).setUp()
80113 if Gio is not None and UNITYSHELL_GSETTINGS_SCHEMA in Gio.Settings.list_relocatable_schemas():
@@ -87,10 +120,12 @@ class UnityTestCase(AutopilotTestCase):
87120 self._proxy = None
88121 self._lightdm_mock_type = None
89122 self._qml_mock_enabled = True
123+ self._environment = {}
90124
91125 #### FIXME: This is a work around re: lp:1238417 ####
92− from autopilot.input import _uinput
93− _uinput._touch_device = _uinput.create_touch_device()
126+ if model() != "Desktop":
127+ from autopilot.input import _uinput
128+ _uinput._touch_device = _uinput.create_touch_device()
94129 ####
95130
96131 self.touch = Touch.create()
@@ -135,6 +170,9 @@ class UnityTestCase(AutopilotTestCase):
135170 self.grid_size = int(os.getenv('GRID_UNIT_PX'))
136171 else:
137172 self.grid_size = int(self.grid_unit_px / scale_divisor)
173+ self._environment["GRID_UNIT_PX"] = str(self.grid_size)
174+ # FIXME this is only needed for Hud.get_close_button_coords
175+ # we should probably rework it so that it's not required
138176 self.patch_environment("GRID_UNIT_PX", str(self.grid_size))
139177
140178 def _geo_larger_than_display(self, width, height):
@@ -153,6 +191,38 @@ class UnityTestCase(AutopilotTestCase):
153191 divisor = divisor * 2
154192 return divisor
155193
194+ def _patch_environment(self, key, value):
195+ """Wrapper for patching env for upstart environment."""
196+ try:
197+ current_value = subprocess.check_output([
198+ "/sbin/initctl",
199+ "get-env",
200+ "--global",
201+ key
202+ ], stderr=subprocess.STDOUT).rstrip()
203+ except subprocess.CalledProcessError:
204+ current_value = None
205+
206+ subprocess.call([
207+ "/sbin/initctl",
208+ "set-env",
209+ "--global",
210+ "%s=%s" % (key, value)
211+ ], stderr=subprocess.STDOUT)
212+ self.addCleanup(self._upstart_reset_env, key, current_value)
213+
214+ def _upstart_reset_env(self, key, value):
215+ logger.info("Resetting upstart env %s to %s", key, value)
216+ if value is None:
217+ subprocess.call(["/sbin/initctl", "unset-env", key], stderr=subprocess.STDOUT)
218+ else:
219+ subprocess.call([
220+ "/sbin/initctl",
221+ "set-env",
222+ "--global",
223+ "%s=%s" % (key, value)
224+ ], stderr=subprocess.STDOUT)
225+
156226 def launch_unity(self, **kwargs):
157227 """Launch the unity shell, return a proxy object for it."""
158228 binary_path = get_binary_path()
@@ -181,13 +251,11 @@ class UnityTestCase(AutopilotTestCase):
181251 except OSError:
182252 pass
183253
184− app_proxy = self.launch_test_application(
254+ app_proxy = self._launch_unity_with_upstart(
185255 binary_path,
186− *self.unity_geometry_args,
187− app_type='qt',
188− emulator_base=UnityEmulatorBase,
189− **kwargs
256+ self.unity_geometry_args
190257 )
258+
191259 self._set_proxy(app_proxy)
192260
193261 # Ensure that the dash is visible before we return:
@@ -197,6 +265,38 @@ class UnityTestCase(AutopilotTestCase):
197265
198266 return app_proxy
199267
268+ def _launch_unity_with_upstart(self, binary_path, args):
269+ logger.info("Starting unity")
270+ self._patch_environment("QT_LOAD_TESTABILITY", 1)
271+
272+ binary_arg = "BINARY=%s" % binary_path
273+ extra_args = "ARGS=%s" % " ".join(args)
274+
275+ output = subprocess.check_output([
276+ "/sbin/initctl",
277+ "start",
278+ "unity8",
279+ binary_arg,
280+ extra_args
281+ ] + ["%s=%s" % (k,v) for k,v in self._environment.iteritems()],
282+ stderr=subprocess.STDOUT)
283+
284+ self.addCleanup(self._cleanup_launching_upstart_unity)
285+
286+ pid = int(output.split()[-1])
287+
288+ return get_proxy_object_for_existing_process(
289+ pid=pid,
290+ emulator_base=UnityEmulatorBase,
291+ )
292+
293+ def _cleanup_launching_upstart_unity(self):
294+ logger.info("Stopping unity")
295+ try:
296+ subprocess.check_output(["/sbin/initctl", "stop", "unity8"], stderr=subprocess.STDOUT)
297+ except subprocess.CalledProcessError:
298+ logger.warning("Appears unity was already stopped!")
299+
200300 def patch_lightdm_mock(self, mock_type='single'):
201301 self._lightdm_mock_type = mock_type
202302 logger.info("Setting up LightDM mock type '%s'", mock_type)
@@ -210,7 +310,7 @@ class UnityTestCase(AutopilotTestCase):
210310 new_ld_library_path = ':'.join(new_ld_library_path)
211311 logger.info("New library path: %s", new_ld_library_path)
212312
213− self.patch_environment('LD_LIBRARY_PATH', new_ld_library_path)
313+ self._environment['LD_LIBRARY_PATH'] = new_ld_library_path
214314
215315 def _get_lightdm_mock_path(self, mock_type):
216316 lib_path = get_mocks_library_path()
@@ -232,7 +332,7 @@ class UnityTestCase(AutopilotTestCase):
232332
233333 qml_import_path = ':'.join(qml_import_path)
234334 logger.info("New QML2 import path: %s", qml_import_path)
235− self.patch_environment('QML2_IMPORT_PATH', qml_import_path)
335+ self._environment['QML2_IMPORT_PATH'] = qml_import_path
236336
237337 def _set_proxy(self, proxy):
238338 """Keep a copy of the proxy object, so we can use it to get common
tests/qmltests/Components/tst_LazyImage.qml+27−23
@@ -70,7 +70,7 @@ Rectangle {
7070
7171 LazyImage {
7272 id: lazy3
73− height: units.gu(10)
73+ height: units.gu(12)
7474 scaleTo: "height"
7575 }
7676
@@ -83,8 +83,8 @@ Rectangle {
8383
8484 LazyImage {
8585 id: lazy4
86− height: units.gu(10)
87− width: units.gu(10)
86+ height: units.gu(12)
87+ width: units.gu(12)
8888 scaleTo: "fit"
8989 }
9090 }
@@ -127,26 +127,26 @@ Rectangle {
127127
128128 function test_lazyimage_data() {
129129 return [
130− {tag: "Unbound Blank", image: lazy1, func: controls1.blank, width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true},
131− {tag: "Unbound Wide", image: lazy1, func: controls1.wide, transition: "readyTransition", width: 160, height: 80, imageWidth: 160, imageHeight: 80},
132− {tag: "Unbound Square", image: lazy1, func: controls1.square, transition: "readyTransition", width: 160, height: 160, imageWidth: 160, imageHeight: 160},
133− {tag: "Unbound Portrait", image: lazy1, func: controls1.portrait, transition: "readyTransition", width: 80, height: 160, imageWidth: 80, imageHeight: 160},
134− {tag: "Unbound Bad path", image: lazy1, func: controls1.badpath, transition: "genericTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true, error: true},
135− {tag: "Width-bound Blank", image: lazy2, func: controls2.blank, width: units.gu(30), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true},
136− {tag: "Width-bound Wide", image: lazy2, func: controls2.wide, transition: "readyTransition", width: units.gu(30), height: units.gu(15), imageWidth: units.gu(30), imageHeight: units.gu(15)},
137− {tag: "Width-bound Square", image: lazy2, func: controls2.square, transition: "readyTransition", width: units.gu(30), height: units.gu(30), imageWidth: units.gu(30), imageHeight: units.gu(30)},
138− {tag: "Width-bound Portrait", image: lazy2, func: controls2.portrait, transition: "readyTransition", width: units.gu(30), height: units.gu(60), imageWidth: units.gu(30), imageHeight: units.gu(60)},
139− {tag: "Width-bound Bad path", image: lazy2, func: controls2.badpath, transition: "genericTransition", width: units.gu(30), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true, error: true},
140− {tag: "Height-bound Blank", image: lazy3, func: controls3.blank, width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true},
141− {tag: "Height-bound Wide", image: lazy3, func: controls3.wide, transition: "readyTransition", width: units.gu(20), height: units.gu(10), imageWidth: units.gu(20), imageHeight: units.gu(10)},
142− {tag: "Height-bound Square", image: lazy3, func: controls3.square, transition: "readyTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10)},
143− {tag: "Height-bound Portrait", image: lazy3, func: controls3.portrait, transition: "readyTransition", width: units.gu(5), height: units.gu(10), imageWidth: units.gu(5), imageHeight: units.gu(10)},
144− {tag: "Height-bound Bad path", image: lazy3, func: controls3.badpath, transition: "genericTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true, error: true},
145− {tag: "Fit Blank", image: lazy4, func: controls4.blank, width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true},
146− {tag: "Fit Wide", image: lazy4, func: controls4.wide, transition: "readyTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(5)},
147− {tag: "Fit Square", image: lazy4, func: controls4.square, transition: "readyTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10)},
148− {tag: "Fit Portrait", image: lazy4, func: controls4.portrait, transition: "readyTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(5), imageHeight: units.gu(10)},
149− {tag: "Fit Bad path", image: lazy4, func: controls4.badpath, transition: "genericTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), placeholder: true, error: true},
130+ {tag: "Unbound Blank", image: lazy1, func: controls1.blank, width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), initialWidth: units.gu(10), initialHeight: units.gu(10), placeholder: true},
131+ {tag: "Unbound Wide", image: lazy1, func: controls1.wide, transition: "readyTransition", width: 160, height: 80, imageWidth: 160, imageHeight: 80, initialWidth: units.gu(10), initialHeight: units.gu(10)},
132+ {tag: "Unbound Square", image: lazy1, func: controls1.square, transition: "readyTransition", width: 160, height: 160, imageWidth: 160, imageHeight: 160, initialWidth: units.gu(10), initialHeight: units.gu(10)},
133+ {tag: "Unbound Portrait", image: lazy1, func: controls1.portrait, transition: "readyTransition", width: 80, height: 160, imageWidth: 80, imageHeight: 160, initialWidth: units.gu(10), initialHeight: units.gu(10)},
134+ {tag: "Unbound Bad path", image: lazy1, func: controls1.badpath, transition: "genericTransition", width: units.gu(10), height: units.gu(10), imageWidth: units.gu(10), imageHeight: units.gu(10), initialWidth: units.gu(10), initialHeight: units.gu(10), placeholder: true, error: true},
135+ {tag: "Width-bound Blank", image: lazy2, func: controls2.blank, width: units.gu(30), height: units.gu(10), imageWidth: units.gu(30), imageHeight: units.gu(10), initialWidth: units.gu(30), initialHeight: units.gu(10), placeholder: true},
136+ {tag: "Width-bound Wide", image: lazy2, func: controls2.wide, transition: "readyTransition", width: units.gu(30), height: units.gu(15), imageWidth: units.gu(30), imageHeight: units.gu(15), initialWidth: units.gu(30), initialHeight: units.gu(10)},
137+ {tag: "Width-bound Square", image: lazy2, func: controls2.square, transition: "readyTransition", width: units.gu(30), height: units.gu(30), imageWidth: units.gu(30), imageHeight: units.gu(30), initialWidth: units.gu(30), initialHeight: units.gu(10)},
138+ {tag: "Width-bound Portrait", image: lazy2, func: controls2.portrait, transition: "readyTransition", width: units.gu(30), height: units.gu(60), imageWidth: units.gu(30), imageHeight: units.gu(60), initialWidth: units.gu(30), initialHeight: units.gu(10)},
139+ {tag: "Width-bound Bad path", image: lazy2, func: controls2.badpath, transition: "genericTransition", width: units.gu(30), height: units.gu(10), imageWidth: units.gu(30), imageHeight: units.gu(10), initialWidth: units.gu(30), initialHeight: units.gu(10), placeholder: true, error: true},
140+ {tag: "Height-bound Blank", image: lazy3, func: controls3.blank, width: units.gu(10), height: units.gu(12), imageWidth: units.gu(10), imageHeight: units.gu(12), initialWidth: units.gu(10), initialHeight: units.gu(12), placeholder: true},
141+ {tag: "Height-bound Wide", image: lazy3, func: controls3.wide, transition: "readyTransition", width: units.gu(24), height: units.gu(12), imageWidth: units.gu(24), imageHeight: units.gu(12), initialWidth: units.gu(10), initialHeight: units.gu(12)},
142+ {tag: "Height-bound Square", image: lazy3, func: controls3.square, transition: "readyTransition", width: units.gu(12), height: units.gu(12), imageWidth: units.gu(12), imageHeight: units.gu(12), initialWidth: units.gu(10), initialHeight: units.gu(12)},
143+ {tag: "Height-bound Portrait", image: lazy3, func: controls3.portrait, transition: "readyTransition", width: units.gu(6), height: units.gu(12), imageWidth: units.gu(6), imageHeight: units.gu(12), initialWidth: units.gu(10), initialHeight: units.gu(12)},
144+ {tag: "Height-bound Bad path", image: lazy3, func: controls3.badpath, transition: "genericTransition", width: units.gu(10), height: units.gu(12), imageWidth: units.gu(10), imageHeight: units.gu(12), initialWidth: units.gu(10), initialHeight: units.gu(12), placeholder: true, error: true},
145+ {tag: "Fit Blank", image: lazy4, func: controls4.blank, width: units.gu(12), height: units.gu(12), imageWidth: units.gu(12), imageHeight: units.gu(12), initialWidth: units.gu(12), initialHeight: units.gu(12), placeholder: true},
146+ {tag: "Fit Wide", image: lazy4, func: controls4.wide, transition: "readyTransition", width: units.gu(12), height: units.gu(12), imageWidth: units.gu(12), imageHeight: units.gu(6), initialWidth: units.gu(12), initialHeight: units.gu(12)},
147+ {tag: "Fit Square", image: lazy4, func: controls4.square, transition: "readyTransition", width: units.gu(12), height: units.gu(12), imageWidth: units.gu(12), imageHeight: units.gu(12), initialWidth: units.gu(12), initialHeight: units.gu(12)},
148+ {tag: "Fit Portrait", image: lazy4, func: controls4.portrait, transition: "readyTransition", width: units.gu(12), height: units.gu(12), imageWidth: units.gu(6), imageHeight: units.gu(12), initialWidth: units.gu(12), initialHeight: units.gu(12)},
149+ {tag: "Fit Bad path", image: lazy4, func: controls4.badpath, transition: "genericTransition", width: units.gu(12), height: units.gu(12), imageWidth: units.gu(12), imageHeight: units.gu(12), initialWidth: units.gu(12), initialHeight: units.gu(12), placeholder: true, error: true},
150150 ]
151151 }
152152
@@ -164,6 +164,10 @@ Rectangle {
164164 compare(data.image.width, data.width);
165165 compare(data.image.height, data.height);
166166
167+ // check initial dimensions
168+ compare(data.image.initialHeight, data.initialHeight);
169+ compare(data.image.initialWidth, data.initialWidth);
170+
167171 // check the shape dimensions
168172 var shape = findChild(data.image, "shape");
169173 compare(shape.width, data.imageWidth);
tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+24−4
@@ -195,9 +195,9 @@ Item {
195195 !runningApplicationsGrid.terminationModeEnabled
196196 }
197197
198− // While on termination mode, clicking a running application tile causes the
199− // corresponding application to be terminated.
200− function test_clickTileToTerminateApp() {
198+ // While on termination mode, clicking a running application tile, outside of
199+ // the close icon should do nothing
200+ function test_clickTileNotClose() {
201201 runningApplicationsGrid.terminationModeEnabled = true
202202
203203 var calendarTile = findChild(runningApplicationsGrid, "runningAppTile Calendar")
@@ -207,10 +207,30 @@ Item {
207207
208208 mouseClick(calendarTile, calendarTile.width/2, calendarTile.height/2)
209209
210+ verify(fakeRunningAppsModel.contains("calendar"))
211+
212+ // The tile for the Calendar app should stay there
213+ tryCompareFunction(checkCalendarTileExists, true)
214+ }
215+
216+ // While in termination mode, clicking on a running application tile's close icon
217+ // causes the corresponding application to be terminated
218+ function test_clickCloseIconToTerminateApp() {
219+ runningApplicationsGrid.terminationModeEnabled = true
220+
221+ var calendarTile = findChild(runningApplicationsGrid, "runningAppTile Calendar")
222+ var calendarTileCloseButton = findChild(runningApplicationsGrid, "closeIcon Calendar")
223+
224+ verify(calendarTile != undefined)
225+ verify(calendarTileCloseButton != undefined)
226+ verify(fakeRunningAppsModel.contains("calendar"))
227+
228+ mouseClick(calendarTileCloseButton, calendarTileCloseButton.width/2, calendarTileCloseButton.height/2)
229+
210230 verify(!fakeRunningAppsModel.contains("calendar"))
211231
212232 // The tile for the Calendar app should eventually vanish since the
213− // application has been terminated
233+ // application has been terminated.
214234 tryCompareFunction(checkCalendarTileExists, false)
215235 }
216236