@@ -414,5 +414,63 @@ void main() {
414414 expect (window.physicalDepth, 100.0 );
415415 expect (window.systemGestureInsets.bottom, 44.0 );
416416 });
417+
418+ test ('Screen padding/insets/viewPadding/systemGestureInsets' , () {
419+ _updateScreenMetrics (
420+ 0 , // screen id
421+ 'S0' , // screen name
422+ 10.0 , // left
423+ 11.0 , // top
424+ 800.0 , // width
425+ 600.0 , // height
426+ 2.5 , // device pixel ratio
427+ 50.0 , // padding top
428+ 0.0 , // padding right
429+ 40.0 , // padding bottom
430+ 0.0 , // padding left
431+ 0.0 , // inset top
432+ 0.0 , // inset right
433+ 0.0 , // inset bottom
434+ 0.0 , // inset left
435+ 0.0 , // system gesture inset top
436+ 0.0 , // system gesture inset right
437+ 0.0 , // system gesture inset bottom
438+ 0.0 , // system gesture inset left
439+ );
440+
441+ expect (window.screen.configuration.viewInsets.bottom, 0.0 );
442+ expect (window.screen.configuration.viewPadding.bottom, 40.0 );
443+ expect (window.screen.configuration.padding.bottom, 40.0 );
444+ expect (window.screen.configuration.devicePixelRatio, 2.5 );
445+ expect (window.screen.configuration.systemGestureInsets.bottom, 0.0 );
446+
447+ _updateScreenMetrics (
448+ 0 , // window id
449+ 'S0' , // screen name
450+ 10.0 , // left
451+ 11.0 , // top
452+ 800.0 , // width
453+ 600.0 , // height
454+ 2.5 , // device pixel ratio
455+ 50.0 , // padding top
456+ 0.0 , // padding right
457+ 40.0 , // padding bottom
458+ 0.0 , // padding left
459+ 0.0 , // inset top
460+ 0.0 , // inset right
461+ 400.0 , // inset bottom
462+ 0.0 , // inset left
463+ 0.0 , // system gesture inset top
464+ 0.0 , // system gesture inset right
465+ 44.0 , // system gesture inset bottom
466+ 0.0 , // system gesture inset left
467+ );
468+
469+ expect (window.screen.configuration.viewInsets.bottom, 400.0 );
470+ expect (window.screen.configuration.viewPadding.bottom, 40.0 );
471+ expect (window.screen.configuration.padding.bottom, 0.0 );
472+ expect (window.screen.configuration.devicePixelRatio, 2.5 );
473+ expect (window.screen.configuration.systemGestureInsets.bottom, 44.0 );
474+ });
417475 });
418476}
0 commit comments