@@ -506,7 +506,7 @@ extension RunnerTests {
506506 /// anything else (a windowed iPad, a multi-screen foldable) keeps requiring a window.
507507 @ MainActor
508508 func soleScreenReferenceFrame ( app : XCUIApplication ) -> CGRect ? {
509- guard appFillsSoleScreen ( app ) else { return nil }
509+ guard soleScreenRouteAdmits ( app ) else { return nil }
510510 let orientation = Int ( RunnerSynthesizedGesture . interfaceOrientation ( forApplication : app ) )
511511 let frame = soleDisplayPortraitSize ( ) . flatMap {
512512 Self . soleScreenReferenceFrame ( portraitSize : $0 , interfaceOrientation : orientation )
@@ -518,10 +518,10 @@ extension RunnerTests {
518518 return frame
519519 }
520520
521- /// The rule `RunnerResolveSoleScreen` owns: an iPhone by its idiom, an iPad only on the
522- /// fills-screen proof.
521+ /// The sole-screen admission rule `RunnerResolveSoleScreen` owns: an iPhone by its idiom, an iPad
522+ /// only on the fills-screen proof.
523523 @ MainActor
524- private func appFillsSoleScreen ( _ app : XCUIApplication ) -> Bool {
524+ private func soleScreenRouteAdmits ( _ app : XCUIApplication ) -> Bool {
525525 var resolvedScreen : AnyObject ?
526526 var resolvedDisplayID : UInt = 0
527527 return RunnerResolveSoleScreen ( app , & resolvedScreen , & resolvedDisplayID ) == nil
@@ -532,7 +532,8 @@ extension RunnerTests {
532532 /// resolved window `fallback`, which names its panel (ADR 0025). When the device's only screen
533533 /// will not report its size, `fallback` is the basis only while the app provably fills that
534534 /// screen; otherwise this is nil and the gesture refuses before it dispatches. Portrait and an
535- /// unknown orientation keep the axes, so they read no box and keep `fallback` without a read.
535+ /// unknown orientation leave the point as it is, so they keep `fallback` without a read; landscape
536+ /// swaps the box's sides and upside-down mirrors the point across them, so both read it.
536537 @ MainActor
537538 func synthesizedRotationFrame ( app : XCUIApplication , fallback : CGRect , interfaceOrientation : Int ) -> CGRect ? {
538539 guard XCUIScreen . screens . count == 1 else { return fallback }
@@ -544,12 +545,12 @@ extension RunnerTests {
544545 return fallback
545546 }
546547 guard let portraitSize = soleDisplayPortraitSize ( ) else {
547- let fillsScreen = appFillsSoleScreen ( app )
548+ let routeAdmits = soleScreenRouteAdmits ( app )
548549 NSLog (
549550 " AGENT_DEVICE_RUNNER_APP_SCREEN_UNRESOLVED stage=rotation-basis basis=%@ " ,
550- fillsScreen ? " window " : " refused "
551+ routeAdmits ? " window " : " refused "
551552 )
552- return fillsScreen ? fallback : nil
553+ return routeAdmits ? fallback : nil
553554 }
554555 return Self . soleScreenReferenceFrame ( portraitSize : portraitSize , interfaceOrientation : interfaceOrientation )
555556 ?? fallback
0 commit comments