Skip to content

Commit 3f921a4

Browse files
committed
[flutter_tools] Merge master and re-enable SwiftPM migration tests
Merge `origin/master` and re-enable the two `validate project settings` tests in `swift_package_manager_integration_migration_test.dart` that were temporarily skipped in flutter#196310. Previous output: ``` 00:32 +3002 ~2 -1: test/general.shard/migrations/swift_package_manager_integration_migration_test.dart: Flutter Package Migration validate project settings throw if settings fail to compile [E] TimeoutException after 0:00:02.000000: Test timed out after 2 seconds. dart:isolate _RawReceivePort._handleMessage ``` Current output: ``` +156: All tests passed! ``` Fixes flutter#196307
2 parents f142c9e + 235d001 commit 3f921a4

16 files changed

Lines changed: 1491 additions & 123 deletions

File tree

‎.agents/skills/flutter-cherry-pick/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Trigger this skill by providing a merged PR number or URL and optionally the tar
7676
- If conflicts were encountered and resolved in Phase 3, gather the documentation of those conflicts.
7777
3. **Draft the Template:**
7878
- Fill in the retrieved template fields using LLM reasoning based on the issue and original PR context.
79+
- Replace `<ORIGINAL_PR_NUMBER>` with the actual original PR number so the cherry-pick PR links to the original PR.
7980
- If conflicts were resolved, clearly document them in the PR description (e.g., in the "Description" or "Changelog" section), explaining what was resolved and how.
8081
- Keep the Markdown structure of the template intact.
8182
- **CRITICAL:** Remove any instructional text or guidelines within the sections (e.g., "What is the impact...", "Explain this cherry pick...") when replacing them with your responses. Do NOT remove explanations around checkboxes or selection items (e.g., "What is the risk level...", "Are you confident...").

‎.ci.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,6 +3129,16 @@ targets:
31293129
["devicelab", "android", "linux", "pixel", "7pro"]
31303130
task_name: integration_ui_keyboard_resize
31313131

3132+
- name: Linux_pixel_7pro integration_ui_keyboard_inset_jump
3133+
recipe: devicelab/devicelab_drone
3134+
presubmit: false
3135+
bringup: true
3136+
timeout: 60
3137+
properties:
3138+
tags: >
3139+
["devicelab", "android", "linux", "pixel", "7pro"]
3140+
task_name: integration_ui_keyboard_inset_jump
3141+
31323142
- name: Linux_pixel_7pro integration_ui_textfield
31333143
recipe: devicelab/devicelab_drone
31343144
presubmit: false

‎.github/PR_TEMPLATE/PULL_REQUEST_CP_TEMPLATE.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Cherry-pick of https://github.com/flutter/flutter/pull/<ORIGINAL_PR_NUMBER>.
2+
13
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
24
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
35

‎.github/workflows/easy-cp.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,16 @@ jobs:
219219
id: create-pr
220220
run: |
221221
PR_TITLE=$(cat "$RUNNER_TEMP/cp/title.txt")
222+
git show upstream/master:.github/PR_TEMPLATE/PULL_REQUEST_CP_TEMPLATE.md \
223+
| sed "s/<ORIGINAL_PR_NUMBER>/${PR_NUMBER}/g" > "$RUNNER_TEMP/cp/body.md"
222224
git push origin "cp-${CHANNEL}-${MERGE_COMMIT_SHA}"
223-
pr_url=$(gh pr create --title "[CP-${CHANNEL}]${PR_TITLE}" --body-file ".github/PR_TEMPLATE/PULL_REQUEST_CP_TEMPLATE.md" --base "${RELEASE_BRANCH}" --label "cp: review" --repo flutter/flutter --head "flutteractionsbot:cp-${CHANNEL}-${MERGE_COMMIT_SHA}")
225+
pr_url=$(gh pr create --title "[CP-${CHANNEL}]${PR_TITLE}" --body-file "$RUNNER_TEMP/cp/body.md" --base "${RELEASE_BRANCH}" --label "cp: review" --repo flutter/flutter --head "flutteractionsbot:cp-${CHANNEL}-${MERGE_COMMIT_SHA}")
224226
echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT"
225227
env:
226228
CHANNEL: ${{ steps.validate.outputs.channel }}
227229
RELEASE_BRANCH: ${{ steps.validate.outputs.release_branch }}
228230
MERGE_COMMIT_SHA: ${{ steps.validate.outputs.merge_commit_sha }}
231+
PR_NUMBER: ${{ steps.validate.outputs.pr_number }}
229232
GH_TOKEN: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
230233

231234
- name: Leave Comment on CP success

‎DEPS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ vars = {
196196
# The version / instance id of the cipd:chromium/fuchsia/test-scripts which
197197
# will be used altogether with fuchsia-sdk to setup the build / test
198198
# environment.
199-
'fuchsia_test_scripts_version': 'PXc5D7S_q6sIYpfFJaEQDIO26ACJMZIigCcuDJieBFAC',
199+
'fuchsia_test_scripts_version': 'oEU515sDqSTvD8SpxKQZK5U4uzo-VV_raZOIqsDjE-oC',
200200

201201
# The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be
202202
# used altogether with fuchsia-sdk to generate gn based build rules.

‎TESTOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
/dev/devicelab/bin/tasks/integration_test_test.dart @bkonyi @flutter/tool
159159
/dev/devicelab/bin/tasks/integration_ui_driver.dart @bkonyi @flutter/tool
160160
/dev/devicelab/bin/tasks/integration_ui_frame_number.dart @jtmcdole @flutter/engine
161+
/dev/devicelab/bin/tasks/integration_ui_keyboard_inset_jump.dart @mboetger @flutter/android
161162
/dev/devicelab/bin/tasks/integration_ui_keyboard_resize.dart @bkonyi @flutter/tool
162163
/dev/devicelab/bin/tasks/integration_ui_textfield.dart @bkonyi @flutter/tool
163164
/dev/devicelab/bin/tasks/microbenchmarks.dart @jtmcdole @flutter/engine
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_devicelab/framework/devices.dart';
6+
import 'package:flutter_devicelab/framework/framework.dart';
7+
import 'package:flutter_devicelab/tasks/integration_tests.dart';
8+
9+
Future<void> main() async {
10+
deviceOperatingSystem = DeviceOperatingSystem.android;
11+
await task(createEndToEndKeyboardInsetJumpTest());
12+
}

‎dev/devicelab/lib/tasks/integration_tests.dart‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ TaskFunction createEndToEndKeyboardTest({String? deviceIdOverride}) {
102102
).call;
103103
}
104104

105+
TaskFunction createEndToEndKeyboardInsetJumpTest({String? deviceIdOverride}) {
106+
return DriverTest(
107+
'${flutterDirectory.path}/dev/integration_tests/ui',
108+
'lib/keyboard_inset_jump.dart',
109+
deviceIdOverride: deviceIdOverride,
110+
).call;
111+
}
112+
105113
TaskFunction createEndToEndFrameNumberTest({String? deviceIdOverride}) {
106114
return DriverTest(
107115
'${flutterDirectory.path}/dev/integration_tests/ui',

‎dev/integration_tests/ui/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Normally they are run via the devicelab.
99

1010
Verifies that showing and hiding the keyboard resizes the content.
1111

12+
## keyboard\_inset\_jump
13+
14+
Verifies that showing and hiding the keyboard in edge-to-edge mode does not produce terminal insets jumps or discontinuous animation steps (validates fix for flutter/flutter#190974).
15+
1216
## routing
1317

1418
Verifies that `flutter drive --route` works correctly.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'dart:convert';
6+
import 'dart:ui' as ui;
7+
8+
import 'package:flutter/material.dart';
9+
import 'package:flutter/scheduler.dart';
10+
import 'package:flutter/services.dart';
11+
import 'package:flutter_driver/driver_extension.dart';
12+
13+
import 'keys.dart' as keys;
14+
15+
/// Integration test host application for measuring soft keyboard animation smoothness.
16+
///
17+
/// What it tests:
18+
/// Hosts an edge-to-edge text editing UI and samples FlutterView.viewInsets.bottom
19+
/// on every frame via persistent frame callbacks, exposing frame-by-frame history and deltas
20+
/// over FlutterDriverExtension.
21+
///
22+
/// Why it was added:
23+
/// Provides an end-to-end integration target for testing fix of flutter/flutter#190974
24+
/// on live Android emulators/devices.
25+
void main() {
26+
final recordedDeltas = <double>[];
27+
final recordedInsets = <double>[];
28+
double? lastInset;
29+
30+
enableFlutterDriverExtension(
31+
enableTextEntryEmulation: false,
32+
handler: (String? message) async {
33+
if (message == 'get_history') {
34+
return jsonEncode(<String, dynamic>{'insets': recordedInsets, 'deltas': recordedDeltas});
35+
}
36+
if (message == 'reset_history') {
37+
recordedDeltas.clear();
38+
recordedInsets.clear();
39+
lastInset = null;
40+
return 'ok';
41+
}
42+
return 'unknown_command';
43+
},
44+
);
45+
46+
SchedulerBinding.instance.addPersistentFrameCallback((Duration _) {
47+
final ui.FlutterView? view = WidgetsBinding.instance.platformDispatcher.views.firstOrNull;
48+
if (view == null) {
49+
return;
50+
}
51+
final double insets = view.viewInsets.bottom / view.devicePixelRatio;
52+
if (lastInset == null || (insets - lastInset!).abs() > 0.01) {
53+
final double delta = lastInset == null ? 0.0 : (insets - lastInset!).abs();
54+
recordedInsets.add(insets);
55+
recordedDeltas.add(delta);
56+
lastInset = insets;
57+
}
58+
});
59+
60+
runApp(const KeyboardInsetJumpApp());
61+
}
62+
63+
class KeyboardInsetJumpApp extends StatefulWidget {
64+
const KeyboardInsetJumpApp({super.key});
65+
66+
@override
67+
State<KeyboardInsetJumpApp> createState() => _KeyboardInsetJumpAppState();
68+
}
69+
70+
class _KeyboardInsetJumpAppState extends State<KeyboardInsetJumpApp> {
71+
final TextEditingController _controller = TextEditingController();
72+
final FocusNode _focusNode = FocusNode();
73+
74+
@override
75+
void initState() {
76+
super.initState();
77+
// Default to edge-to-edge system UI mode for testing issue #190974
78+
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
79+
}
80+
81+
@override
82+
void dispose() {
83+
_controller.dispose();
84+
_focusNode.dispose();
85+
super.dispose();
86+
}
87+
88+
@override
89+
Widget build(BuildContext context) {
90+
final double insetsBottom = MediaQuery.viewInsetsOf(context).bottom;
91+
92+
return MaterialApp(
93+
debugShowCheckedModeBanner: false,
94+
home: Scaffold(
95+
resizeToAvoidBottomInset: false,
96+
body: SafeArea(
97+
bottom: false,
98+
child: Padding(
99+
padding: EdgeInsets.only(bottom: insetsBottom),
100+
child: Column(
101+
children: <Widget>[
102+
const SizedBox(height: 40),
103+
Text(
104+
insetsBottom.toStringAsFixed(1),
105+
key: const Key(keys.kInsetsText),
106+
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
107+
),
108+
ElevatedButton(
109+
key: const Key(keys.kEdgeToEdgeButton),
110+
onPressed: () {
111+
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
112+
},
113+
child: const Text('Enable EdgeToEdge'),
114+
),
115+
const Spacer(),
116+
Container(height: 8, color: Colors.red),
117+
Padding(
118+
padding: const EdgeInsets.all(8.0),
119+
child: TextField(
120+
key: const Key(keys.kDefaultTextField),
121+
controller: _controller,
122+
focusNode: _focusNode,
123+
decoration: const InputDecoration(
124+
hintText: 'Tap to open soft keyboard',
125+
border: OutlineInputBorder(),
126+
),
127+
),
128+
),
129+
],
130+
),
131+
),
132+
),
133+
floatingActionButton: FloatingActionButton(
134+
key: const Key(keys.kUnfocusButton),
135+
onPressed: () {
136+
_focusNode.unfocus();
137+
},
138+
child: const Icon(Icons.keyboard_hide),
139+
),
140+
),
141+
);
142+
}
143+
}

0 commit comments

Comments
 (0)