Merge lp:~dandrader/unity8/removeApplicationStage into lp:unity8

Proposed by Daniel d'Andrada on 2016-06-17
Status: Merged
Approved by: Michał Sawicz on 2016-08-10
Approved revision: 2549
Merged at revision: 2592
Proposed branch: lp:~dandrader/unity8/removeApplicationStage
Merge into: lp:unity8
Diff against target: 294 lines (+35/-42)
10 files modified
CMakeLists.txt (+1/-1)
debian/control (+3/-3)
qml/Stages/TabletStage.qml (+1/-1)
tests/mocks/Unity/Application/ApplicationInfo.cpp (+0/-8)
tests/mocks/Unity/Application/ApplicationInfo.h (+0/-4)
tests/mocks/Unity/Application/ApplicationManager.cpp (+0/-10)
tests/plugins/Unity/Launcher/launchermodeltest.cpp (+0/-2)
tests/qmltests/Stages/tst_TabletStage.qml (+6/-3)
tests/qmltests/tst_OrientedShell.qml (+10/-6)
tests/qmltests/tst_Shell.qml (+14/-4)
To merge this branch: bzr merge lp:~dandrader/unity8/removeApplicationStage
Reviewer Review Type Date Requested Status
Michał Sawicz Approve on 2016-08-10
Unity8 CI Bot continuous-integration Needs Fixing on 2016-08-02
Gerry Boland 2016-06-17 Needs Fixing on 2016-07-29
Review via email: mp+297766@code.launchpad.net

Commit Message

Remove stage property from Application

It's not used anymore

Description of the Change

* Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~dandrader/unity-api/removeApplicationStage/+merge/297764
https://code.launchpad.net/~dandrader/qtmir/removeApplicationStage/+merge/297765

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

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

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

To post a comment you must log in.
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2442
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1506/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2008/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2036
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1953
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1953
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1953
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1944/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1944/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1506/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Text conflict in debian/control
1 conflicts encountered.

Daniel d'Andrada (dandrader) wrote :

On 20/06/2016 04:24, Albert Astals Cid wrote:
> Text conflict in debian/control
> 1 conflicts encountered.
>
Fixed

Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2491
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1574/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2093/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2121
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2032
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2032
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2032
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2023/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2023/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1574/rebuild

review: Needs Fixing (continuous-integration)
Gerry Boland (gerboland) wrote :

Yay!

review: Approve
Michał Sawicz (saviq) wrote :

This causes OrientedShell failures:
 qmltestrunner.OrientedShell::test_appSupportingOnlyPrimaryOrientationMakesPhoneShellStayPut
 qmltestrunner.OrientedShell::test_appSupportingOnlyPrimaryOrientationWillOnlyRotateInLandscape
 qmltestrunner.OrientedShell::test_switchingToAppWithDifferentRotation

review: Needs Fixing
Michał Sawicz (saviq) wrote :

Also:
 qmltestrunner.OrientedShell::test_greeterRemainsInPrimaryOrientation

Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2548
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1844/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2406/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2434
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2321
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2321
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2321
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2314/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2314/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1844/rebuild

review: Needs Fixing (continuous-integration)
Gerry Boland (gerboland) wrote :

Breaks:
Shell::test_lifecyclePolicyExemption
Shell::test_lifecyclePolicyForNonTouchApp
as they both check the application stage as a sanity check

review: Needs Fixing
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2549
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1862/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2431/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2459
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2346
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2346
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2346
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2339/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2339/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1862/rebuild

review: Needs Fixing (continuous-integration)
2549. By Daniel d'Andrada on 2016-08-02

Update tests

Daniel d'Andrada (dandrader) wrote :

All fixed. Sorry for the mess.

Michał Sawicz (saviq) wrote :

ACK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-07-14 07:09:00 +0000
3+++ CMakeLists.txt 2016-08-02 00:16:55 +0000
4@@ -57,7 +57,7 @@
5 find_package(Qt5Concurrent 5.4 REQUIRED)
6 find_package(Qt5Sql 5.4 REQUIRED)
7
8-pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=19)
9+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=20)
10 pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
11 pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
12 pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
13
14=== modified file 'debian/control'
15--- debian/control 2016-07-22 07:42:41 +0000
16+++ debian/control 2016-08-02 00:16:55 +0000
17@@ -34,7 +34,7 @@
18 libubuntugestures5-dev (>= 1.3.2030),
19 libubuntugestures5-private-dev (>= 1.3.2030),
20 libudev-dev,
21- libunity-api-dev (>= 7.116),
22+ libunity-api-dev (>= 7.117),
23 libusermetricsoutput1-dev,
24 # Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
25 libx11-dev[!armhf],
26@@ -151,7 +151,7 @@
27 qtdeclarative5-ubuntu-settings-components (>= 0.7),
28 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
29 ubuntu-thumbnailer-impl-0,
30- unity-application-impl-19,
31+ unity-application-impl-20,
32 unity-notifications-impl-3,
33 unity-plugin-scopes | unity-scopes-impl,
34 unity-scopes-impl-12,
35@@ -197,7 +197,7 @@
36 Depends: ${misc:Depends},
37 ${shlibs:Depends},
38 Provides: unity-application-impl,
39- unity-application-impl-19,
40+ unity-application-impl-20,
41 Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)
42 Description: Fake environment for running Unity 8 shell
43 Provides fake implementations of some QML modules used by Unity 8 shell
44
45=== modified file 'qml/Stages/TabletStage.qml'
46--- qml/Stages/TabletStage.qml 2016-06-22 13:42:30 +0000
47+++ qml/Stages/TabletStage.qml 2016-08-02 00:16:55 +0000
48@@ -536,7 +536,7 @@
49 if (!app) {
50 return index;
51 }
52- var stage = spreadRepeater.itemAt(index) ? spreadRepeater.itemAt(index).stage : app.stage;
53+ var stage = spreadRepeater.itemAt(index) ? spreadRepeater.itemAt(index).stage : ApplicationInfoInterface.MainStage;
54
55 // don't shuffle indexes greater than "actives or next"
56 if (index > 2) return index;
57
58=== modified file 'tests/mocks/Unity/Application/ApplicationInfo.cpp'
59--- tests/mocks/Unity/Application/ApplicationInfo.cpp 2016-06-06 14:13:05 +0000
60+++ tests/mocks/Unity/Application/ApplicationInfo.cpp 2016-08-02 00:16:55 +0000
61@@ -175,14 +175,6 @@
62 }
63 }
64
65-void ApplicationInfo::setStage(Stage value)
66-{
67- if (value != m_stage) {
68- m_stage = value;
69- Q_EMIT stageChanged(value);
70- }
71-}
72-
73 void ApplicationInfo::setState(State value)
74 {
75 if (value != m_state) {
76
77=== modified file 'tests/mocks/Unity/Application/ApplicationInfo.h'
78--- tests/mocks/Unity/Application/ApplicationInfo.h 2016-06-03 11:11:34 +0000
79+++ tests/mocks/Unity/Application/ApplicationInfo.h 2016-08-02 00:16:55 +0000
80@@ -67,9 +67,6 @@
81
82 QUrl icon() const override { return m_icon; }
83
84- Q_INVOKABLE void setStage(Stage value) override; // invokable only for mock
85- Stage stage() const override { return m_stage; }
86-
87 Q_INVOKABLE void setState(State value);
88 State state() const override { return m_state; }
89
90@@ -137,7 +134,6 @@
91 QString m_appId;
92 QString m_name;
93 QUrl m_icon;
94- Stage m_stage{MainStage};
95 State m_state{Stopped};
96 bool m_fullscreen{false};
97 Qt::ScreenOrientations m_supportedOrientations{Qt::PortraitOrientation |
98
99=== modified file 'tests/mocks/Unity/Application/ApplicationManager.cpp'
100--- tests/mocks/Unity/Application/ApplicationManager.cpp 2016-06-20 11:53:35 +0000
101+++ tests/mocks/Unity/Application/ApplicationManager.cpp 2016-08-02 00:16:55 +0000
102@@ -102,8 +102,6 @@
103 return app->comment();
104 case RoleIcon:
105 return app->icon();
106- case RoleStage:
107- return app->stage();
108 case RoleState:
109 return app->state();
110 case RoleFocused:
111@@ -166,11 +164,6 @@
112 if (!appIndex.isValid()) return;
113 Q_EMIT dataChanged(appIndex, appIndex, QVector<int>() << ApplicationManager::RoleState);
114 });
115- connect(application, &ApplicationInfo::stageChanged, this, [application, this]() {
116- QModelIndex appIndex = findIndex(application);
117- if (!appIndex.isValid()) return;
118- Q_EMIT dataChanged(appIndex, appIndex, QVector<int>() << ApplicationManager::RoleStage);
119- });
120
121 connect(application, &ApplicationInfo::closed, this, [application, this]() {
122 this->remove(application);
123@@ -344,7 +337,6 @@
124 application->setScreenshotId("gallery");
125 application->setIconId("gallery");
126 application->setShellChrome(Mir::LowChrome);
127- application->setStage(ApplicationInfo::MainStage);
128 m_availableApplications.append(application);
129
130 application = new ApplicationInfo(this);
131@@ -381,7 +373,6 @@
132 application->setName("GMail");
133 application->setIconId("gmail");
134 application->setScreenshotId("gmail-webapp.svg");
135- application->setStage(ApplicationInfo::MainStage);
136 application->setSupportedOrientations(Qt::PortraitOrientation
137 | Qt::LandscapeOrientation
138 | Qt::InvertedPortraitOrientation
139@@ -393,7 +384,6 @@
140 application->setName("Music");
141 application->setIconId("soundcloud");
142 application->setScreenshotId("music");
143- application->setStage(ApplicationInfo::MainStage);
144 application->setSupportedOrientations(Qt::PortraitOrientation
145 | Qt::LandscapeOrientation
146 | Qt::InvertedPortraitOrientation
147
148=== modified file 'tests/plugins/Unity/Launcher/launchermodeltest.cpp'
149--- tests/plugins/Unity/Launcher/launchermodeltest.cpp 2016-07-07 16:18:59 +0000
150+++ tests/plugins/Unity/Launcher/launchermodeltest.cpp 2016-08-02 00:16:55 +0000
151@@ -49,8 +49,6 @@
152 QString name() const override { return "mock"; }
153 QString comment() const override { return "this is a mock"; }
154 QUrl icon() const override { return QUrl(); }
155- ApplicationInfoInterface::Stage stage() const override { return ApplicationInfoInterface::MainStage; }
156- void setStage(ApplicationInfoInterface::Stage) override {}
157 ApplicationInfoInterface::State state() const override { return ApplicationInfoInterface::Running; }
158 bool focused() const override { return m_focused; }
159 QString splashTitle() const override { return QString(); }
160
161=== modified file 'tests/qmltests/Stages/tst_TabletStage.qml'
162--- tests/qmltests/Stages/tst_TabletStage.qml 2016-06-22 13:42:30 +0000
163+++ tests/qmltests/Stages/tst_TabletStage.qml 2016-08-02 00:16:55 +0000
164@@ -290,8 +290,9 @@
165 var webbrowserSurfaceId = topSurfaceList.nextId;
166 webbrowserCheckBox.checked = true;
167 waitUntilAppSurfaceShowsUp(webbrowserSurfaceId);
168- var webbrowserApp = ApplicationManager.findApplication(webbrowserCheckBox.appId);
169- compare(webbrowserApp.stage, ApplicationInfoInterface.MainStage);
170+ var webbrowserDelegate = findChild(tabletStage, "spreadDelegate_" + webbrowserSurfaceId);
171+ verify(webbrowserDelegate);
172+ compare(webbrowserDelegate.stage, ApplicationInfoInterface.MainStage);
173 var webbrowserWindow = findAppWindowForSurfaceId(webbrowserSurfaceId);
174 verify(webbrowserWindow);
175
176@@ -397,8 +398,10 @@
177 var webbrowserSurfaceId = topSurfaceList.nextId;
178 webbrowserCheckBox.checked = true;
179 waitUntilAppSurfaceShowsUp(webbrowserSurfaceId);
180+ var webbrowserDelegate = findChild(tabletStage, "spreadDelegate_" + webbrowserSurfaceId);
181+ verify(webbrowserDelegate);
182+ compare(webbrowserDelegate.stage, ApplicationInfoInterface.MainStage);
183 var webbrowserApp = ApplicationManager.findApplication(webbrowserCheckBox.appId);
184- compare(webbrowserApp.stage, ApplicationInfoInterface.MainStage);
185
186 var gallerySurfaceId = topSurfaceList.nextId;
187 galleryCheckBox.checked = true;
188
189=== modified file 'tests/qmltests/tst_OrientedShell.qml'
190--- tests/qmltests/tst_OrientedShell.qml 2016-06-30 19:04:19 +0000
191+++ tests/qmltests/tst_OrientedShell.qml 2016-08-02 00:16:55 +0000
192@@ -515,7 +515,6 @@
193 compare(primaryDelegate.focus, true);
194 compare(primaryApp.rotatesWindowContents, false);
195 compare(primaryApp.supportedOrientations, Qt.PrimaryOrientation);
196- compare(primaryApp.stage, ApplicationInfoInterface.MainStage);
197
198 tryCompareFunction(function(){return primaryDelegate.surface != null;}, true);
199 verify(checkAppSurfaceOrientation(primaryAppWindow, primaryApp, root.primaryOrientationAngle));
200@@ -559,7 +558,8 @@
201 compare(ApplicationManager.focusedApplicationId, "primary-oriented-app");
202 compare(primaryApp.rotatesWindowContents, false);
203 compare(primaryApp.supportedOrientations, Qt.PrimaryOrientation);
204- compare(primaryApp.stage, ApplicationInfoInterface.MainStage);
205+ var primaryDelegate = findChild(shell, "spreadDelegate_" + primarySurfaceId);
206+ compare(primaryDelegate.stage, ApplicationInfoInterface.MainStage);
207
208 tryCompareFunction(function(){return primaryApp.surfaceList.count > 0;}, true);
209
210@@ -599,7 +599,6 @@
211 compare(gmailApp.rotatesWindowContents, false);
212 compare(gmailApp.supportedOrientations, Qt.PortraitOrientation | Qt.LandscapeOrientation
213 | Qt.InvertedPortraitOrientation | Qt.InvertedLandscapeOrientation);
214- compare(gmailApp.stage, ApplicationInfoInterface.MainStage);
215
216 // wait until it's able to rotate
217 tryCompare(shell, "orientationChangesEnabled", true);
218@@ -724,7 +723,6 @@
219 compare(gmailApp.rotatesWindowContents, false);
220 compare(gmailApp.supportedOrientations, Qt.PortraitOrientation | Qt.LandscapeOrientation
221 | Qt.InvertedPortraitOrientation | Qt.InvertedLandscapeOrientation);
222- compare(gmailApp.stage, ApplicationInfoInterface.MainStage);
223
224 waitUntilAppWindowIsFullyLoaded(gmailSurfaceId);
225
226@@ -736,7 +734,10 @@
227 compare(musicApp.rotatesWindowContents, false);
228 compare(musicApp.supportedOrientations, Qt.PortraitOrientation | Qt.LandscapeOrientation
229 | Qt.InvertedPortraitOrientation | Qt.InvertedLandscapeOrientation);
230- compare(musicApp.stage, ApplicationInfoInterface.MainStage);
231+ if (data.deviceName === "manta" || data.deviceName === "flo") {
232+ var musicDelegate = findChild(shell, "spreadDelegate_" + musicSurfaceId);
233+ compare(musicDelegate.stage, ApplicationInfoInterface.MainStage);
234+ }
235
236 waitUntilAppWindowIsFullyLoaded(musicSurfaceId);
237 tryCompare(shell, "orientationChangesEnabled", true);
238@@ -889,6 +890,7 @@
239 ];
240 }
241 function test_appInSideStageDoesntRotateOnStartUp(data) {
242+ WindowStateStorage.saveStage("twitter-webapp", ApplicationInfoInterface.SideStage)
243 loadShell(data.deviceName);
244
245 var twitterDelegate = null;
246@@ -905,9 +907,11 @@
247 signalSpy.target = null;
248 signalSpy.signalName = "runningChanged";
249
250+ var twitterSurfaceId = topLevelSurfaceList.nextId;
251 var twitterApp = ApplicationManager.startApplication("twitter-webapp");
252 verify(twitterApp);
253- twitterApp.stage = ApplicationInfoInterface.SideStage;
254+ var twitterDelegate = findChild(shell, "spreadDelegate_" + twitterSurfaceId);
255+ compare(twitterDelegate.stage, ApplicationInfoInterface.SideStage);
256
257 // ensure the mock twitter-webapp is as we expect
258 compare(twitterApp.rotatesWindowContents, false);
259
260=== modified file 'tests/qmltests/tst_Shell.qml'
261--- tests/qmltests/tst_Shell.qml 2016-07-06 19:45:19 +0000
262+++ tests/qmltests/tst_Shell.qml 2016-08-02 00:16:55 +0000
263@@ -2103,8 +2103,13 @@
264 waitUntilAppWindowIsFullyLoaded(app2SurfaceId);
265
266 // Sanity checking
267- compare(app1.stage, ApplicationInfoInterface.MainStage);
268- compare(app2.stage, ApplicationInfoInterface.MainStage);
269+ if (data.usageScenario === "tablet") {
270+ var app1Delegate = findChild(shell, "spreadDelegate_" + app1SurfaceId);
271+ compare(app1Delegate.stage, ApplicationInfoInterface.MainStage);
272+
273+ var app2Delegate = findChild(shell, "spreadDelegate_" + app2SurfaceId);
274+ compare(app2Delegate.stage, ApplicationInfoInterface.MainStage);
275+ }
276 verify(!app1.isTouchApp);
277
278 var app1Surface = app1.surfaceList.get(0);
279@@ -2139,8 +2144,13 @@
280 waitUntilAppWindowIsFullyLoaded(app2SurfaceId);
281
282 // Sanity checking
283- compare(app1.stage, ApplicationInfoInterface.MainStage);
284- compare(app2.stage, ApplicationInfoInterface.MainStage);
285+ if (data.usageScenario === "tablet") {
286+ var app1Delegate = findChild(shell, "spreadDelegate_" + app1SurfaceId);
287+ compare(app1Delegate.stage, ApplicationInfoInterface.MainStage);
288+
289+ var app2Delegate = findChild(shell, "spreadDelegate_" + app2SurfaceId);
290+ compare(app2Delegate.stage, ApplicationInfoInterface.MainStage);
291+ }
292
293 var app1Surface = app1.surfaceList.get(0);
294 verify(app1Surface);

Subscribers

People subscribed via source and target branches