Repository: flutter
Issue: integration_test doesn't show UI under test with a non-default view physicalSize
Labels: a: tests,c: regression,framework,f: integration_test,P2,team-framework,triaged-framework,found in release: 3.22,found in release: 3.23

### Steps to reproduce

1. Run an integration test without changing ```tester.view.physicalSize```.  (```flutter test integration_test/main.dart```)
2. See that UI is displayed.
3. Run an integration test that changes ```tester.view.physicalSize``` (```flutter test integration_test/main.dart```).
4. See that "Test starting..." message is displayed instead of the UI. 

It's reproducible both on MacOS and Linux.
It's a regression from Flutter 3.19. Change of ```physicalSize``` works fine there.

### Expected results

The integration test window displays the UI under test with appropriate ```physicalSize```.

### Actual results

The integration test window displays only the "Test starting..." message while the test is executed in the background.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('Simplest widget integration test.',
      (WidgetTester tester) async {
    tester.view.physicalSize = const Size(320, 200);
    // Load app widget.
    await tester.pumpWidget(
      MaterialApp(
        home: Container(
          width: 400,
          height: 400,
          color: Colors.green,
          child: const Text('Hello'),
        ),
      ),
    );

    // Make sure to show the green background.
    await tester.pumpAndSettle(Durations.extralong4);

    // Verify the counter starts at 0.
    expect(find.text('Hello'), findsOneWidget);
  });
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

<img width="870" alt="Screenshot 2024-05-28 at 22 18 43" src="https://github.com/flutter/flutter/assets/183287/2928c894-6d14-416e-92d3-1eeed55e7cfe">

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
% flutter doctor -v
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1 23E224 darwin-arm64, locale en-CZ)
    • Flutter version 3.22.0 on channel stable at /opt/homebrew/Caskroom/flutter/3.19.5/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (3 weeks ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 125.0.6422.78

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
```

</details>