on xenial help sign in
Merge from trunk
commit43df35add6c80a301e9ff88002c0351d5cb93259 authorMichael Terry <michael.terry@canonical.com> dateTue 6 Aug 2013, 16:12 (13 years ago) parentb3a4c152a526c6
22 files changed+102−349
CODING+2−11 Components/CrossFadeImage.qml+1−3 Greeter/GreeterContent.qml+1 Shell.qml+9−22 build−1 debian/changelog+44 debian/control+1−3 plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+2−2 run_on_device+2−2 tests/data/unity/backgrounds/blue.png tests/data/unity/backgrounds/red.png tests/mocks/CMakeLists.txt−1 tests/mocks/GSettings/CMakeLists.txt−31 tests/mocks/GSettings/fake_gsettings.cpp−102 tests/mocks/GSettings/fake_gsettings.h−90 tests/mocks/GSettings/plugin.cpp−33 tests/mocks/GSettings/plugin.h−31 tests/mocks/GSettings/qmldir−2 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp+19 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp+20 tests/qmltests/CMakeLists.txt+1−1 tests/qmltests/tst_Shell.qml−14
CODING+2−11
@@ -23,16 +23,10 @@ $ cd ~/unity8/trunk
2323$ ./build --setup
2424
2525 this will:
26− - add ppa:ubuntu-unity/next
2726 - install the required dependencies to build, as well as run on the desktop
2827 - it should also install unity-scope-home and unity-lens-application which
2928 are technically "recommends", not strict dependencies
3029
31−Note, once the PPA is added, the script runs apt-get update, if you have
32−any failures associated with it, the build script will bail out of the setup
33−and fail to install all the required dependencies.
34−
35−
3630build Unity 8
3731-------------
3832
@@ -75,14 +69,11 @@ Notes
7569Running Unity 8 on devices
7670==========================
7771- Ubuntu Touch builds are currently only available in 13.10 flavour
78−- supported hardware should match one those listed here
72+- supported hardware should match one of those listed here
7973 https://wiki.ubuntu.com/Touch/Devices#Running_fine
8074- follow the Ubuntu Touch install instructions for your chosen device
8175 https://wiki.ubuntu.com/Touch/Install
82−- make sure your device is connected to a WiFi network
83−- If you haven’t already or if you’ve just freshly flashed your device
84− make sure you run phablet-network-setup which will allow package updates to
85− the device
76+- make sure your device is connected to a network
8677- also make sure you have your SSH key in ~/.ssh/id_rsa.pub (or install one
8778 on the device yourself)
8879
Components/CrossFadeImage.qml+1−3
@@ -85,7 +85,7 @@ Item {
8585 Connections {
8686 target: __nextImage
8787 onStatusChanged: {
88− if (__nextImage.status == Image.Ready || __nextImage.status == Image.Error) {
88+ if (__nextImage.status == Image.Ready) {
8989 swapImages();
9090 }
9191 }
@@ -96,7 +96,6 @@ Item {
9696 anchors.fill: parent
9797 cache: false
9898 asynchronous: true
99− fillMode: Image.PreserveAspectCrop
10099 z: 1
101100 }
102101
@@ -105,7 +104,6 @@ Item {
105104 anchors.fill: parent
106105 cache: false
107106 asynchronous: true
108− fillMode: Image.PreserveAspectCrop
109107 z: 0
110108 }
111109
Greeter/GreeterContent.qml+1
@@ -37,6 +37,7 @@ MouseArea {
3737
3838 source: shell.background
3939 anchors.fill: parent
40+ crossFade: false
4041 fadeInFirst: false
4142 }
4243
Shell.qml+9−22
@@ -15,7 +15,6 @@
1515 */
1616
1717import QtQuick 2.0
18−import GSettings 1.0
1918import Ubuntu.Application 0.1
2019import Ubuntu.Components 0.1
2120import Ubuntu.Gestures 0.1
@@ -43,8 +42,8 @@ FocusScope {
4342 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
4443
4544 property real edgeSize: units.gu(2)
46− property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
47− property url background: backgroundSettings.pictureUri
45+ property url default_background: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
46+ property url background: default_background
4847 readonly property real panelHeight: panel.panelHeight
4948
5049 property bool dashShown: dash.shown
@@ -130,11 +129,6 @@ FocusScope {
130129 }
131130 }
132131
133− GSettings {
134− id: backgroundSettings
135− schema.id: "org.gnome.desktop.background"
136− }
137−
138132 VolumeControl {
139133 id: volumeControl
140134 }
@@ -142,12 +136,6 @@ FocusScope {
142136 Keys.onVolumeUpPressed: volumeControl.volumeUp()
143137 Keys.onVolumeDownPressed: volumeControl.volumeDown()
144138
145− Keys.onReleased: {
146− if (event.key == Qt.Key_PowerOff) {
147− greeter.show()
148− }
149− }
150−
151139 Item {
152140 id: underlay
153141 objectName: "underlay"
@@ -165,16 +153,12 @@ FocusScope {
165153 // through the translucent parts of the shell surface.
166154 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
167155
168− CrossFadeImage {
156+ Image {
169157 id: backgroundImage
170− objectName: "backgroundImage"
171158 source: shell.background
159+ sourceSize.width: parent.width
160+ sourceSize.height: parent.height
172161 anchors.fill: parent
173− onStatusChanged: {
174− if (status == Image.Error) {
175− backgroundSettings.pictureUri = shell.defaultBackground
176− }
177− }
178162 }
179163
180164 Rectangle {
@@ -263,6 +247,7 @@ FocusScope {
263247 }
264248 }
265249
250+
266251 Item {
267252 id: stagesOuterContainer
268253
@@ -327,6 +312,7 @@ FocusScope {
327312 ignoreUnknownSignals: true
328313 }
329314
315+
330316 Stage {
331317 id: mainStage
332318
@@ -505,7 +491,7 @@ FocusScope {
505491 onSelected: {
506492 // Update background
507493 var bgPath = greeter.model.data(uid, LightDM.UserRoles.BackgroundPathRole)
508− shell.background = bgPath ? bgPath : defaultBackground
494+ shell.background = bgPath ? bgPath : default_background
509495 // Update edge demo hint
510496 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole)
511497 shell.showEdgeDemo = true //AccountsService.getUserProperty(user, "demo-edges")
@@ -581,6 +567,7 @@ FocusScope {
581567 onPowerStateChange: {
582568 if (state == 0) { // suspend
583569 powerConnection.setFocused(false);
570+ greeter.show();
584571 } else if (state == 1) { // active
585572 powerConnection.setFocused(true);
586573 }
build−1
@@ -36,7 +36,6 @@ BUILD_TYPE="debug"
3636[ $# -eq 1 ] && BUILD_TYPE="$1"
3737
3838install_dependencies() {
39− [ -f /etc/apt/sources.list.d/ubuntu-unity-next-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:ubuntu-unity/next || exit 1
4039 sudo apt-get update || exit 4
4140 echo "Installing Unity 8 dependencies.."
4241 sudo apt-get install devscripts \
debian/changelog+44
@@ -1,3 +1,47 @@
1+unity8 (7.81.3+13.10.20130806-0ubuntu1) saucy; urgency=low
2+
3+ [ Michael Terry ]
4+ * Show the greeter when powerd tells us to, not just whenever we press
5+ the power key. (LP: #1186256)
6+
7+ [ Ubuntu daily release ]
8+ * Automatic snapshot from revision 164
9+
10+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 06 Aug 2013 03:43:01 +0000
11+
12+unity8 (7.81.3+13.10.20130805-0ubuntu1) saucy; urgency=low
13+
14+ [ Michael Terry ]
15+ * Fixes the lockscreen and swiping on the greeter still being possible
16+ even when in tablet mode. (LP: #1204984)
17+ * Watch powerd signals to notice a sleep and unfocus current app when
18+ that happens.
19+
20+ [ Michael Zanetti ]
21+ * make findChild also find invisible childs This considerably
22+ increases the amount of items to be searched up to a level where
23+ testShell didn't finish any more with searching. Hence this commit
24+ also changes findChild to do a breadth-first instead of a depth-
25+ first search.
26+ * Read background from GSettings or fallback to default_background.
27+
28+ [ Andrea Cimitan ]
29+ * Read background from GSettings or fallback to default_background.
30+
31+ [ Albert Astals ]
32+ * Make LVWPH provide a delegateIndex for sectionHeaders This way we
33+ can match the sectionHeader to the model easier in the qml/js side .
34+ * Fix tryCompare call The 4th parameter of tryCompare is timeout not
35+ message .
36+
37+ [ Daniel d'Andrada ]
38+ * Read background from GSettings or fallback to default_background.
39+
40+ [ Ubuntu daily release ]
41+ * Automatic snapshot from revision 162
42+
43+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 05 Aug 2013 02:32:05 +0000
44+
145unity8 (7.81.3+13.10.20130802-0ubuntu1) saucy; urgency=low
246
347 [ Michael Terry ]
debian/control+1−3
@@ -58,10 +58,8 @@ Description: Indicators client test application
5858
5959Package: unity8
6060Architecture: any
61−Depends: gsettings-desktop-schemas,
62− qmenumodel-qml,
61+Depends: qmenumodel-qml,
6362 qtdeclarative5-dee-plugin,
64− qtdeclarative5-gsettings1.0,
6563 qtdeclarative5-ubuntu-ui-toolkit-plugin,
6664 qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
6765 qtdeclarative5-xmllistmodel-plugin,
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+2−2
@@ -734,7 +734,7 @@ ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIn
734734 releaseItem(listItem);
735735 listItem = nullptr;
736736 } else {
737− listItem->setCulled(listItem->y() + listItem->height() + m_clipItem->y() < contentY() || listItem->y() + m_clipItem->y() >= contentY() + height());
737+ listItem->setCulled(listItem->y() + listItem->height() + m_clipItem->y() <= contentY() || listItem->y() + m_clipItem->y() >= contentY() + height());
738738 if (m_visibleItems.isEmpty()) {
739739 m_visibleItems << listItem;
740740 } else {
@@ -1040,7 +1040,7 @@ void ListViewWithPageHeader::layout()
10401040 int firstReallyVisibleItem = -1;
10411041 int modelIndex = m_firstVisibleIndex;
10421042 Q_FOREACH(ListItem *item, m_visibleItems) {
1043− const bool cull = pos + item->height() < visibleFrom || pos >= visibleTo;
1043+ const bool cull = pos + item->height() <= visibleFrom || pos >= visibleTo;
10441044 item->setCulled(cull);
10451045 item->setY(pos);
10461046 if (!cull && firstReallyVisibleItem == -1) {
run_on_device+2−2
@@ -27,8 +27,8 @@ usage() {
2727 echo " -k, --keylock Enable a Keyboard lock screen when running"
2828 echo ""
2929 echo "IMPORTANT:"
30− echo " * Make sure to have the networking and PPAs setup on the device beforehand (phablet-deploy-networking && phablet-ppa-fetch)."
31− echo " * Execute that script from a directory containing a branch the shell code."
30+ echo " * Make sure to have networking setup on the device beforehand."
31+ echo " * Execute that script from a directory containing unity8 code."
3232 exit 1
3333}
3434
tests/data/unity/backgrounds/blue.pngdeleted

Binary file not shown.

tests/data/unity/backgrounds/red.pngdeleted

Binary file not shown.

tests/mocks/CMakeLists.txt−1
@@ -1,5 +1,4 @@
11add_subdirectory(AccountsService)
2−add_subdirectory(GSettings)
32add_subdirectory(HudClient)
43add_subdirectory(libusermetrics)
54add_subdirectory(LightDM)
tests/mocks/GSettings/CMakeLists.txtdeleted−31
@@ -1,31 +0,0 @@
1−set(CMAKE_AUTOMOC ON)
2−
3−include(FindPkgConfig)
4−find_package(Qt5Core REQUIRED)
5−find_package(Qt5Quick REQUIRED)
6−
7−include_directories(
8− ${CMAKE_CURRENT_BINARY_DIR}
9− ${Qt5Core_INCLUDE_DIRS}
10− ${Qt5Quick_INCLUDE_DIRS}
11−)
12−
13−add_definitions(-DQT_NO_KEYWORDS)
14−
15−set(GSettingsQML_SOURCES
16− fake_gsettings.cpp
17− plugin.cpp
18−)
19−
20−add_library(FakeGSettingsQml MODULE ${GSettingsQML_SOURCES})
21−target_link_libraries(FakeGSettingsQml
22− ${Qt5Core_LIBRARIES}
23− ${Qt5Quick_LIBRARIES}
24−)
25−
26−qt5_use_modules(FakeGSettingsQml Qml)
27−
28−# copy qmldir file into build directory for shadow builds
29−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
30− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
31− )
tests/mocks/GSettings/fake_gsettings.cppdeleted−102
@@ -1,102 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#include "fake_gsettings.h"
18−
19−#include <QList>
20−
21−GSettingsControllerQml* GSettingsControllerQml::s_controllerInstance = 0;
22−
23−GSettingsControllerQml::GSettingsControllerQml() {
24−}
25−
26−GSettingsControllerQml::~GSettingsControllerQml() {
27− s_controllerInstance = 0;
28−}
29−
30−GSettingsControllerQml* GSettingsControllerQml::instance() {
31− if(!s_controllerInstance) {
32− s_controllerInstance = new GSettingsControllerQml();
33− }
34− return s_controllerInstance;
35−}
36−
37−void GSettingsControllerQml::registerSettingsObject(GSettingsQml *obj) {
38− m_registeredGSettings.append(obj);
39−}
40−
41−void GSettingsControllerQml::unRegisterSettingsObject(GSettingsQml *obj) {
42− m_registeredGSettings.removeOne(obj);
43−}
44−
45−void GSettingsControllerQml::setPictureUri(const QString &str) {
46− Q_FOREACH (GSettingsQml *obj, m_registeredGSettings) {
47− obj->setPictureUri(str);
48− }
49−}
50−
51−GSettingsSchemaQml::GSettingsSchemaQml(QObject *parent): QObject(parent) {
52−}
53−
54−QByteArray GSettingsSchemaQml::id() const {
55− return m_id;
56−}
57−
58−void GSettingsSchemaQml::setId(const QByteArray &id) {
59− if (m_id.isEmpty()) {
60− qWarning("GSettings.schema.id may only be set on construction");
61− return;
62− }
63−
64− m_id = id;
65−}
66−
67−QByteArray GSettingsSchemaQml::path() const {
68− return m_path;
69−}
70−
71−void GSettingsSchemaQml::setPath(const QByteArray &path) {
72− if (m_path.isEmpty()) {
73− qWarning("GSettings.schema.path may only be set on construction");
74− return;
75− }
76−
77− m_path = path;
78−}
79−
80−GSettingsQml::GSettingsQml(QObject *parent): QObject(parent) {
81− m_schema = new GSettingsSchemaQml(this);
82− GSettingsControllerQml::instance()->registerSettingsObject(this);
83−}
84−
85−GSettingsQml::~GSettingsQml() {
86− GSettingsControllerQml::instance()->unRegisterSettingsObject(this);
87−}
88−
89−GSettingsSchemaQml * GSettingsQml::schema() const {
90− return m_schema;
91−}
92−
93−QString GSettingsQml::pictureUri() const {
94− return m_pictureUri;
95−}
96−
97−void GSettingsQml::setPictureUri(const QString &str) {
98− if (str != m_pictureUri) {
99− m_pictureUri = str;
100− Q_EMIT pictureUriChanged(m_pictureUri);
101− }
102−}
tests/mocks/GSettings/fake_gsettings.hdeleted−90
@@ -1,90 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#ifndef FAKE_GSETTINGS_H
18−#define FAKE_GSETTINGS_H
19−
20−#include <QList>
21−#include <QtQml>
22−
23−class GSettingsSchemaQml: public QObject
24−{
25− Q_OBJECT
26−
27− Q_PROPERTY(QByteArray id READ id WRITE setId)
28−
29−public:
30− GSettingsSchemaQml(QObject *parent = NULL);
31−
32− QByteArray id() const;
33− void setId(const QByteArray &id);
34−
35− QByteArray path() const;
36− void setPath(const QByteArray &path);
37−
38−private:
39− QByteArray m_id;
40− QByteArray m_path;
41−};
42−
43−class GSettingsQml: public QObject
44−{
45− Q_OBJECT
46−
47− Q_PROPERTY(GSettingsSchemaQml* schema READ schema NOTIFY schemaChanged)
48− Q_PROPERTY(QString pictureUri READ pictureUri WRITE setPictureUri NOTIFY pictureUriChanged)
49−
50−public:
51− GSettingsQml(QObject *parent = NULL);
52− ~GSettingsQml();
53−
54− GSettingsSchemaQml * schema() const;
55− QString pictureUri() const;
56−
57− void setPictureUri(const QString &str);
58−
59−Q_SIGNALS:
60− void schemaChanged();
61− void pictureUriChanged(const QString&);
62−
63−private:
64− GSettingsSchemaQml* m_schema;
65−
66− QString m_pictureUri;
67−
68− friend class GSettingsSchemaQml;
69−};
70−
71−class GSettingsControllerQml: public QObject
72−{
73− Q_OBJECT
74−
75−public:
76− static GSettingsControllerQml* instance();
77− ~GSettingsControllerQml();
78−
79− void registerSettingsObject(GSettingsQml *obj);
80− void unRegisterSettingsObject(GSettingsQml *obj);
81− Q_INVOKABLE void setPictureUri(const QString &str);
82−
83−private:
84− GSettingsControllerQml();
85−
86− static GSettingsControllerQml* s_controllerInstance;
87− QList<GSettingsQml *> m_registeredGSettings;
88−};
89−
90−#endif // FAKE_GSETTINGS_H
tests/mocks/GSettings/plugin.cppdeleted−33
@@ -1,33 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#include "plugin.h"
18−#include "fake_gsettings.h"
19−
20−#include <QtQml>
21−
22−static QObject* controllerProvider(QQmlEngine* /* engine */, QJSEngine* /* scriptEngine */)
23−{
24− return GSettingsControllerQml::instance();
25−}
26−
27−void FakeGSettingsQmlPlugin::registerTypes(const char *uri)
28−{
29− qmlRegisterSingletonType<GSettingsControllerQml>(uri, 1, 0, "GSettingsController", controllerProvider);
30− qmlRegisterType<GSettingsQml>(uri, 1, 0, "GSettings");
31− qmlRegisterUncreatableType<GSettingsSchemaQml>(uri, 1, 0, "GSettingsSchema",
32− "GSettingsSchema can only be used inside of a GSettings component");
33−}
tests/mocks/GSettings/plugin.hdeleted−31
@@ -1,31 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#ifndef PLUGIN_H
18−#define PLUGIN_H
19−
20−#include <QtQml/QQmlExtensionPlugin>
21−
22−class FakeGSettingsQmlPlugin : public QQmlExtensionPlugin
23−{
24− Q_OBJECT
25− Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26−
27−public:
28− void registerTypes(const char *uri);
29−};
30−
31−#endif // PLUGIN_H
tests/mocks/GSettings/qmldirdeleted−2
@@ -1,2 +0,0 @@
1−module GSettings
2−plugin FakeGSettingsQml
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp+19
@@ -1390,6 +1390,25 @@ private Q_SLOTS:
13901390 lvwph->showHeader();
13911391 }
13921392
1393+ void testCullOnBottomEdge()
1394+ {
1395+ changeContentY(200);
1396+
1397+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1398+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1399+ verifyItem(0, -150., 150., true);
1400+ verifyItem(1, 0., 200., false);
1401+ verifyItem(2, 200., 350., false);
1402+ verifyItem(3, 550., 350., true);
1403+ QCOMPARE(lvwph->m_minYExtent, 0.);
1404+ QCOMPARE(lvwph->m_clipItem->y(), 200.);
1405+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1406+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1407+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1408+ QCOMPARE(lvwph->contentY(), 200.);
1409+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1410+ }
1411+
13931412private:
13941413 QQuickView *view;
13951414 ListViewWithPageHeader *lvwph;
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp+20
@@ -1691,6 +1691,26 @@ private Q_SLOTS:
16911691 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
16921692 }
16931693
1694+ void testCullOnBottomEdge()
1695+ {
1696+ changeContentY(240);
1697+
1698+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1699+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1700+ verifyItem(0, -190., 190., true, "Agressive", true);
1701+ verifyItem(1, 0., 240., false, "Regular", false);
1702+ verifyItem(2, 240., 390., false, "Mild", false);
1703+ verifyItem(3, 630., 390., true, "Bold", true);
1704+ QCOMPARE(lvwph->m_minYExtent, 0.);
1705+ QCOMPARE(lvwph->m_clipItem->y(), 240.);
1706+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1707+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1708+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1709+ QCOMPARE(lvwph->contentY(), 240.);
1710+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1711+ QVERIFY(QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1712+ }
1713+
16941714private:
16951715 QQuickView *view;
16961716 ListViewWithPageHeader *lvwph;
tests/qmltests/CMakeLists.txt+1−1
@@ -26,7 +26,7 @@ set(qmltest_DEFAULT_TARGETS qmluitests)
2626set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
2727set(qmltest_DEFAULT_PROPERTIES "")
2828
29−add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks
29+add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
3030 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
3131add_qml_test(Components DemoOverlay)
3232add_manual_qml_test(Components DragHandle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
tests/qmltests/tst_Shell.qml−14
@@ -19,7 +19,6 @@
1919
2020import QtQuick 2.0
2121import QtTest 1.0
22−import GSettings 1.0
2322import Ubuntu.Application 0.1
2423import Unity.Test 0.1 as UT
2524
@@ -278,18 +277,5 @@ Item {
278277 }
279278 } while (!isStill);
280279 }
281−
282− function test_wallpaper_data() {
283− return [
284− {tag: "red", url: "tests/data/unity/backgrounds/red.png"},
285− {tag: "blue", url: "tests/data/unity/backgrounds/blue.png"}
286− ]
287− }
288−
289− function test_wallpaper(data) {
290− var backgroundImage = findChild(shell, "backgroundImage")
291− GSettingsController.setPictureUri(data.url)
292− tryCompareFunction(function() { return backgroundImage.source.toString().indexOf(data.url) !== -1; }, true)
293− }
294280 }
295281}