@@ -369,4 +369,45 @@ void testChildShellGetSize() {
369369 assertEquals (300 , childShell .getSizeInPixels ().x );
370370 }
371371
372+ @ Test
373+ public void testAutoScaleDisabledProperty () {
374+ Display display = Display .getDefault ();
375+ Shell shell = new Shell (display );
376+ shell .setData ("AUTOSCALE_DISABLED" , true );
377+ assertEquals (AutoscalingMode .DISABLED_INHERITED , shell .autoscalingMode );
378+ Composite child = new Composite (shell , SWT .NONE );
379+ assertEquals (AutoscalingMode .DISABLED_INHERITED , child .autoscalingMode );
380+ }
381+
382+ @ Test
383+ public void testAutoScaleDisabled () {
384+ Display display = Display .getDefault ();
385+ Shell shell = new Shell (display );
386+ shell .setAutoscalingMode (AutoscalingMode .DISABLED );
387+ assertEquals (AutoscalingMode .DISABLED , shell .autoscalingMode );
388+ Composite child = new Composite (shell , SWT .NONE );
389+ assertEquals (AutoscalingMode .ENABLED , child .autoscalingMode );
390+ }
391+
392+ @ Test
393+ public void testPropagateAutoScaleDisabledProperty () {
394+ Display display = Display .getDefault ();
395+ Shell shell = new Shell (display );
396+ shell .setData ("AUTOSCALE_DISABLED" , true );
397+ shell .setData ("PROPOGATE_AUTOSCALE_DISABLED" , false );
398+ assertEquals (AutoscalingMode .DISABLED , shell .autoscalingMode );
399+ Composite child = new Composite (shell , SWT .NONE );
400+ assertEquals (AutoscalingMode .ENABLED , child .autoscalingMode );
401+ }
402+
403+ @ Test
404+ public void testPropagateAutoScaleDisabled () {
405+ Display display = Display .getDefault ();
406+ Shell shell = new Shell (display );
407+ shell .setAutoscalingMode (AutoscalingMode .DISABLED_INHERITED );
408+ assertEquals (AutoscalingMode .DISABLED_INHERITED , shell .autoscalingMode );
409+ Composite child = new Composite (shell , SWT .NONE );
410+ assertEquals (AutoscalingMode .DISABLED_INHERITED , child .autoscalingMode );
411+ }
412+
372413}
0 commit comments