on xenial help sign in
Turn verify intro tryCompareFunction
05f6481Albert Astals Cid
tests/qmltests/tst_OrientedShell.qml+5−7
@@ -536,8 +536,6 @@ Rectangle {
536 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
536 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
537 }
537 }
538
538
539−/* Flaky in adt and cannot reproduce locally. Given the deadline I won't risk this getting stuck in proposed.
540− Adding a skip() seems to fail this nevertheless for accessing a null object
541 function test_appSupportingOnlyPrimaryOrientationWillOnlyRotateInLandscape_data() {
539 function test_appSupportingOnlyPrimaryOrientationWillOnlyRotateInLandscape_data() {
542 return [
540 return [
543 {tag: "manta", deviceName: "manta"},
541 {tag: "manta", deviceName: "manta"},
@@ -561,25 +559,25 @@ Rectangle {
561 compare(dashApp.stage, ApplicationInfoInterface.MainStage);
559 compare(dashApp.stage, ApplicationInfoInterface.MainStage);
562
560
563 tryCompareFunction(function(){return dashApp.surfaceList.count > 0;}, true);
561 tryCompareFunction(function(){return dashApp.surfaceList.count > 0;}, true);
564− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle));
565
562
563+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle)}, true);
566 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
564 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
565+
567 rotateTo(90);
566 rotateTo(90);
568
567
569− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle));
568+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle)}, true);
570 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
569 compare(shell.transformRotationAngle, root.primaryOrientationAngle);
571
570
572 rotateTo(180);
571 rotateTo(180);
573
572
574− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180));
573+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180)}, true);
575 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
574 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
576
575
577 rotateTo(270);
576 rotateTo(270);
578
577
579− verify(checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180));
578+ tryCompareFunction(function(){return checkAppSurfaceOrientation(dashAppWindow, dashApp, root.primaryOrientationAngle + 180)}, true);
580 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
579 compare(shell.transformRotationAngle, root.primaryOrientationAngle + 180);
581 }
580 }
582−*/
583
581
584 function test_greeterRemainsInPrimaryOrientation_data() {
582 function test_greeterRemainsInPrimaryOrientation_data() {
585 return [
583 return [