on xenial help sign in
fix tests
commitf5cbddf94c93d13731852f18dcbd3f4ce5f2783b authorNick Dedekind <nick.dedekind@canonical.com> dateTue 3 Jan 2017, 12:45 (10 years ago) parentb9d9191
11 files changed+44−23
tests/mocks/Unity/Application/SurfaceManager.cpp+2−2 tests/mocks/Unity/Application/SurfaceManager.h+1−1 tests/qmltests/ApplicationMenuDataLoader.qml+4−1 tests/qmltests/ApplicationMenus/tst_MenuBar.qml+5−1 tests/qmltests/Panel/tst_Panel.qml+5−3 tests/qmltests/Stage/tst_DecoratedWindow.qml+5−1 tests/qmltests/Stage/tst_DesktopStage.qml+4−8 tests/qmltests/Stage/tst_PhoneStage.qml+4−2 tests/qmltests/Stage/tst_TabletStage.qml+4−2 tests/qmltests/Stage/tst_WindowDecoration.qml+5−1 tests/qmltests/tst_Shell.qml+5−1
tests/mocks/Unity/Application/SurfaceManager.cpp+2−2
@@ -83,7 +83,7 @@ void SurfaceManager::registerSurface(MirSurface *surface)
8383 this->onStateRequested(surface, state);
8484 });
8585
86− const QString persistentId = m_virtualKeyboard->persistentId();
86+ const QString persistentId = surface->persistentId();
8787 connect(surface, &QObject::destroyed, this, [=]() {
8888 this->onSurfaceDestroyed(surface, persistentId);
8989 });
@@ -225,7 +225,7 @@ void SurfaceManager::onStateRequested(MirSurface *surface, Mir::State state)
225225 DEBUG_MSG("("<<surface<<","<<state<<") ended");
226226}
227227
228−void SurfaceManager::onSurfaceDestroyed(const QString& persistentId, MirSurface *surface)
228+void SurfaceManager::onSurfaceDestroyed(MirSurface *surface, const QString& persistentId)
229229{
230230 m_surfaces.removeAll(surface);
231231 if (m_focusedSurface == surface) {
tests/mocks/Unity/Application/SurfaceManager.h+1−1
@@ -87,7 +87,7 @@ Q_SIGNALS:
8787
8888private Q_SLOTS:
8989 void onStateRequested(MirSurface *surface, Mir::State state);
90− void onSurfaceDestroyed(const QString& persistentId, MirSurface *surface);
90+ void onSurfaceDestroyed(MirSurface *surface, const QString& persistentId);
9191
9292private:
9393 void doRaise(unity::shell::application::MirSurfaceInterface *surface);
tests/qmltests/ApplicationMenuDataLoader.qml+4−1
@@ -5,8 +5,11 @@ import Unity.ApplicationMenu 0.1
55import Unity.Indicators 0.1 as Indicators
66
77Object {
8+
9+ property var surfaceManager: null
10+
811 Connections {
9− target: SurfaceManager
12+ target: surfaceManager
1013 onSurfaceCreated: {
1114 var fakeMenuPath = "/" + surface.persistentId.replace(/\W+/g, "");
1215
tests/qmltests/ApplicationMenus/tst_MenuBar.qml+5−1
@@ -42,7 +42,11 @@ Item {
4242 value: false
4343 }
4444
45− ApplicationMenuDataLoader { id: appMenuData }
45+ SurfaceManager { id: sMgr }
46+ ApplicationMenuDataLoader {
47+ id: appMenuData
48+ surfaceManager: sMgr
49+ }
4650
4751 Rectangle {
4852 anchors {
tests/qmltests/Panel/tst_Panel.qml+5−3
@@ -42,9 +42,11 @@ PanelTest {
4242 value: keyboardAttached.checked
4343 }
4444
45− ApplicationMenuDataLoader { id: appMenuData }
46−
47− SurfaceManager {}
45+ SurfaceManager { id: sMgr }
46+ ApplicationMenuDataLoader {
47+ id: appMenuData
48+ surfaceManager: sMgr
49+ }
4850
4951 Component.onCompleted: {
5052 theme.name = "Ubuntu.Components.Themes.SuruDark"
tests/qmltests/Stage/tst_DecoratedWindow.qml+5−1
@@ -46,7 +46,11 @@ Rectangle {
4646 value: false
4747 }
4848
49− ApplicationMenuDataLoader { }
49+ SurfaceManager { id: sMgr }
50+ ApplicationMenuDataLoader {
51+ id: appMenuData
52+ surfaceManager: sMgr
53+ }
5054
5155 Item {
5256 id: fakeShell
tests/qmltests/Stage/tst_DesktopStage.qml+4−8
@@ -60,10 +60,11 @@ Item {
6060 }
6161 }
6262
63−
64− ApplicationMenuDataLoader { }
65−
6663 SurfaceManager { id: sMgr }
64+ ApplicationMenuDataLoader {
65+ id: appMenuData
66+ surfaceManager: sMgr
67+ }
6768
6869 TopLevelWindowModel {
6970 id: topSurfaceList
@@ -152,11 +153,6 @@ Item {
152153 }
153154 }
154155
155− SignalSpy {
156− id: mouseEaterSpy
157− target: clickThroughTester
158− }
159−
160156 StageTestCase {
161157 id: testCase
162158 name: "DesktopStage"
tests/qmltests/Stage/tst_PhoneStage.qml+4−2
@@ -31,9 +31,11 @@ Item {
3131
3232 property var greeter: { fullyShown: true }
3333
34− ApplicationMenuDataLoader { }
35−
3634 SurfaceManager { id: sMgr }
35+ ApplicationMenuDataLoader {
36+ id: appMenuData
37+ surfaceManager: sMgr
38+ }
3739
3840 Stage {
3941 id: stage
tests/qmltests/Stage/tst_TabletStage.qml+4−2
@@ -35,9 +35,11 @@ Rectangle {
3535
3636 property var greeter: { fullyShown: true }
3737
38− ApplicationMenuDataLoader { }
39−
4038 SurfaceManager { id: sMgr }
39+ ApplicationMenuDataLoader {
40+ id: appMenuData
41+ surfaceManager: sMgr
42+ }
4143
4244 Stage {
4345 id: stage
tests/qmltests/Stage/tst_WindowDecoration.qml+5−1
@@ -47,7 +47,11 @@ Item {
4747 property string name: "webbrowser"
4848 }
4949
50− ApplicationMenuDataLoader { id: menuData }
50+ SurfaceManager { id: sMgr }
51+ ApplicationMenuDataLoader {
52+ id: appMenuData
53+ surfaceManager: sMgr
54+ }
5155
5256 UnityMenuModel {
5357 id: menuBackend
tests/qmltests/tst_Shell.qml+5−1
@@ -53,7 +53,11 @@ Rectangle {
5353 shellLoader.active = true;
5454 }
5555
56− ApplicationMenuDataLoader {}
56+ SurfaceManager { id: sMgr }
57+ ApplicationMenuDataLoader {
58+ id: appMenuData
59+ surfaceManager: sMgr
60+ }
5761
5862 property var shell: shellLoader.item ? shellLoader.item : null
5963 onShellChanged: {