on xenial help sign in
Addressed review comments
commitfb2d2e74dad31657dbe37335e397b5f8b077bc63 authorMarcus Tomlinson <marcus.tomlinson@canonical.com> dateFri 12 Sep 2014, 17:43 (12 years ago) parent6472b0f
2 files changed+6−6
tests/mocks/Unity/fake_scope.cpp+2−4 tests/qmltests/Dash/tst_GenericScopeView.qml+4−2
tests/mocks/Unity/fake_scope.cpp+2−4
@@ -176,12 +176,10 @@ PreviewStack* Scope::preview(QVariant const& result)
176176{
177177 Q_UNUSED(result);
178178
179− if (m_returnNullPreview)
180− {
179+ if (m_returnNullPreview) {
181180 return nullptr;
182181 }
183− else
184− {
182+ else {
185183 // This probably leaks, do we don't care
186184 // it's a test after all
187185 return new PreviewStack;
tests/qmltests/Dash/tst_GenericScopeView.qml+4−2
@@ -302,7 +302,6 @@ Item {
302302 }
303303
304304 function test_tryOpenNullPreview() {
305− var originalScopeId = genericScopeView.scope.id;
306305 genericScopeView.scope = scopes.getScope("NullPreviewScope");
307306
308307 tryCompareFunction(function() {
@@ -324,7 +323,10 @@ Item {
324323 tryCompare(testCase.subPageLoader, "open", false);
325324 tryCompare(testCase.subPageLoader, "visible", false);
326325
327− genericScopeView.scope = scopes.getScope(originalScopeId)
326+ mousePress(tile, tile.width / 2, tile.height / 2);
327+ tryCompare(testCase.subPageLoader, "open", false);
328+ tryCompare(testCase.subPageLoader, "visible", false);
329+ mouseRelease(tile, tile.width / 2, tile.height / 2);
328330 }
329331
330332 function test_showPreviewCarousel() {