on xenial help sign in
Addressed review comments
fb2d2e7Marcus Tomlinson
tests/mocks/Unity/fake_scope.cpp+2−4
@@ -176,12 +176,10 @@ PreviewStack* Scope::preview(QVariant const& result)
176{
176{
177 Q_UNUSED(result);
177 Q_UNUSED(result);
178
178
179− if (m_returnNullPreview)
179+ if (m_returnNullPreview) {
180− {
181 return nullptr;
180 return nullptr;
182 }
181 }
183− else
182+ else {
184− {
185 // This probably leaks, do we don't care
183 // This probably leaks, do we don't care
186 // it's a test after all
184 // it's a test after all
187 return new PreviewStack;
185 return new PreviewStack;
tests/qmltests/Dash/tst_GenericScopeView.qml+4−2
@@ -302,7 +302,6 @@ Item {
302 }
302 }
303
303
304 function test_tryOpenNullPreview() {
304 function test_tryOpenNullPreview() {
305− var originalScopeId = genericScopeView.scope.id;
306 genericScopeView.scope = scopes.getScope("NullPreviewScope");
305 genericScopeView.scope = scopes.getScope("NullPreviewScope");
307
306
308 tryCompareFunction(function() {
307 tryCompareFunction(function() {
@@ -324,7 +323,10 @@ Item {
324 tryCompare(testCase.subPageLoader, "open", false);
323 tryCompare(testCase.subPageLoader, "open", false);
325 tryCompare(testCase.subPageLoader, "visible", false);
324 tryCompare(testCase.subPageLoader, "visible", false);
326
325
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);
328 }
330 }
329
331
330 function test_showPreviewCarousel() {
332 function test_showPreviewCarousel() {