on xenial help sign in
Fix dash overview test and prevent crash in mock ApplicationInfo's d'tor.
b94dabbMichał Sawicz
tests/mocks/Unity/Application/ApplicationInfo.cpp+1
@@ -54,6 +54,7 @@ ApplicationInfo::~ApplicationInfo()
54 if (m_surface) {
54 if (m_surface) {
55 Q_EMIT SurfaceManager::singleton()->surfaceDestroyed(m_surface);
55 Q_EMIT SurfaceManager::singleton()->surfaceDestroyed(m_surface);
56 m_surface->deleteLater();
56 m_surface->deleteLater();
57+ setSurface(nullptr);
57 }
58 }
58}
59}
59
60
tests/qmltests/Dash/tst_Dash.qml+2−1
@@ -127,8 +127,9 @@ Item {
127 tryCompare(scopes, "loaded", true);
127 tryCompare(scopes, "loaded", true);
128 var dashContentList = findChild(dash, "dashContentList");
128 var dashContentList = findChild(dash, "dashContentList");
129 tryCompare(dashContentList, "count", 6);
129 tryCompare(dashContentList, "count", 6);
130+ tryCompareFunction(function() { return findChild(dash, "MockScope1 loader") != null; }, true);
130 var mockScope1Loader = findChild(dash, "MockScope1 loader");
131 var mockScope1Loader = findChild(dash, "MockScope1 loader");
131− tryCompareFunction(function() { return mockScope1Loader.item != null; }, true);
132+ tryCompare(mockScope1Loader, "status", Loader.Ready);
132
133
133 // Show the overview
134 // Show the overview
134 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
135 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));