on xenial help sign in
Turn verify intro tryCompareFunction
e81ef4fAlbert Astals Cid
tests/qmltests/tst_OrientedShell.qml+5−7
@@ -516,8 +516,6 @@ Rectangle {
516 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
516 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
517 }
517 }
518
518
519−/* Flaky in adt and cannot reproduce locally. Given the deadline I won't risk this getting stuck in proposed.
520− Adding a skip() seems to fail this nevertheless for accessing a null object
521 function test_appSupportingOnlyPrimaryOrientationWillOnlyRotateInLandscape_data() {
519 function test_appSupportingOnlyPrimaryOrientationWillOnlyRotateInLandscape_data() {
522 return [
520 return [
523 {tag: "manta", deviceName: "manta"},
521 {tag: "manta", deviceName: "manta"},
@@ -538,25 +536,25 @@ Rectangle {
538 compare(dashApp.stage, ApplicationInfoInterface.MainStage);
536 compare(dashApp.stage, ApplicationInfoInterface.MainStage);
539
537
540 tryCompareFunction(function(){return dashApp.session.lastSurface != null;}, true);
538 tryCompareFunction(function(){return dashApp.session.lastSurface != null;}, true);
541− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle));
542
539
540+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle)}, true);
543 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
541 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
542+
544 rotateTo(90);
543 rotateTo(90);
545
544
546− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle));
545+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle)}, true);
547 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
546 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
548
547
549 rotateTo(180);
548 rotateTo(180);
550
549
551− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180));
550+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180)}, true);
552 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
551 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
553
552
554 rotateTo(270);
553 rotateTo(270);
555
554
556− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180));
555+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180)}, true);
557 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
556 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
558 }
557 }
559−*/
560
558
561 function test_greeterRemainsInPrimaryOrientation_data() {
559 function test_greeterRemainsInPrimaryOrientation_data() {
562 return [
560 return [