68 Commits

Author SHA1 Message Date
Jason Simmons
47a710ba99
Move flutter/third_party/txt into flutter/txt (#164248)
The flutter/txt library does not currently contain any third-party code.
2025-03-04 16:13:40 +00:00
Chinmay Garde
daa09b9a64 [Impeller] Run simulator tests with Impeller enabled. (flutter/engine#56740)
The Info.plist override was missed earlier.

The main changes to the tests are due to the UI thread merge with the platform thread. The amendment to the "spawn" API are due to the fact that the assertions checked for the presence of GrDirectContext which will never exist with Impeller.

Unblocks https://github.com/flutter/engine/pull/56706
2024-11-21 23:48:59 +00:00
Jenn Magder
c24f7454d0 Migrate FlutterView, FlutterPlatformViews, FlutterOverlayView to ARC (flutter/engine#52535)
Smart pointers support ARC as of
https://github.com/flutter/engine/pull/47612, and the unit tests were
migrated in https://github.com/flutter/engine/pull/48162.

Migrate `FlutterView`, `FlutterPlatformViews`, and `FlutterOverlayView`
from MRC to ARC.

Part of https://github.com/flutter/flutter/issues/137801.
2024-05-10 12:07:30 -07:00
Jenn Magder
d4f698b036 Fix UIVisualEffectView leak in platform view filter (flutter/engine#52591)
I found this while migrating `FlutterPlatformViews_Internal.mm` to ARC https://github.com/flutter/engine/pull/52535.  I'll land this first.

```objc
  if (_backdropFilterView != visualEffectView) {
    _backdropFilterView = [visualEffectView retain];
  }
```
should instead be something like:
```objc
  if (_backdropFilterView != visualEffectView) {
    id oldBackdropFilterView = _backdropFilterView;
    _backdropFilterView = [visualEffectView retain];
    [oldBackdropFilterView release];
  }
```
But that's already what the built-in MRC `nonatomic, retain` property setter does, so use that instead.

Added a test that passes on this PR and fails on main.
2024-05-08 22:40:16 +00:00
Jenn Magder
d30a412e28 Support accessibility back gesture to pop route from view controller (flutter/engine#51241)
Adapted suggestion from https://github.com/flutter/flutter/issues/74246#issuecomment-971326926 to pop the route if the view controller route if `accessibilityPerformEscape` is called at that level in the responder chain.

Ideally this could know if the route was successfully popped, and only then return `YES` (halting propagation through the responder chain).

I confirmed by editing https://docs.flutter.dev/cookbook/navigation/navigation-basics#interactive-example as a demo that that the two-finger scrub (move two fingers back and forth three times quickly, making a "z") navigates back to the last route, and that the [`SementicObject`](e889b287f1/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm (L763)) scrub, which already worked, continued to work.

I'm not super familiar with this code, hopefully there aren't further gotchas I'm not thinking of.

Fixes https://github.com/flutter/flutter/issues/74246

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-18 18:11:59 +00:00
Matan Lurey
e9e5a237f8 Finish landing missing/incorrect header guards across flutter/engine (flutter/engine#50069)
Generated by https://github.com/flutter/engine/pull/48903 (`dart ./tools/header_guard_check/bin/main.dart --fix`).

As discussed with @cbracken and @jmagman, the guards are not technically needed on the Mac/iOS code, but they (a) do not hurt and (b) still provide value if for some reason `#include` is used instead of `#import` (though I suspect we could try to add that to the tool in the future as well).
2024-01-26 19:42:36 +00:00
Jenn Magder
e7d1af70f1 Turn on scenario app screenshots (flutter/engine#49066)
Save a recording/screenshot to the uploaded xcresult when a Scenario test fails.

<img width="1052" alt="Screenshot 2023-12-14 at 6 34 47 PM" src="https://github.com/flutter/engine/assets/682784/c1294497-28f6-4400-b21c-da689a224dc4">

<img width="244" alt="Screenshot 2023-12-14 at 6 41 03 PM" src="https://github.com/flutter/engine/assets/682784/f769dd5f-a71b-4320-b9ef-64eac722166a">

No more errant spew as reported in https://github.com/flutter/engine/pull/19668 when this was originally turned off.
```
 Test Case '-[StatusBarTest testTapStatusBar]' started.
     t =     0.00s Start Test at 2023-12-14 18:20:34.207
...
     t =     2.69s     Synthesize event
     t =     2.70s         Find the StatusBar at {{0.0, 0.0}, {375.0, 20.0}}
     t =     2.72s         Find the StatusBar at {{0.0, 0.0}, {375.0, 20.0}}
     t =     2.74s         Find the StatusBar at {{0.0, 0.0}, {375.0, 20.0}}
     t =     3.03s     Wait for com.apple.springboard to idle
     t =     3.43s Waiting 1.0s for "0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField to exist
     t =     4.43s     Checking `Expect predicate `exists == 1` for object "0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField`
     t =     4.43s         Checking existence of `"0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField`
     t =     4.45s         Capturing element debug description
     t =     4.45s Checking existence of `"0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField`
 /Volumes/Work/s/w/ir/cache/builder/src/out/ios_debug_sim/scenario_app/Scenarios/ScenariosUITests/StatusBarTest.m:37: error: -[StatusBarTest testTapStatusBar] : ((exists) is true) failed
     t =     4.48s Tear Down
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8761683198070320113/+/u/test:_Scenario_App_Integration_Tests__3_/stdout

Fixes https://github.com/flutter/flutter/issues/140192

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-12-21 19:01:15 +00:00
Bartek Pacia
61a61a8632 [Docs] Add more info about running tests on iOS (flutter/engine#48859)
I wish this info was there, that'd save me from looking inside the script.
2023-12-19 22:54:54 +00:00
Matej Knopp
33a6339c63 Add FlutterMetalLayer as optional alternative to CAMetalLayer (flutter/engine#48226)
This PR implements `FlutterMetalLayer`, a drop-in (as far as Flutter is
concerned) replacement for `CAMetalLayer`. The biggest difference is
that `FlutterMetalLayer` can present frames from background thread
within a `CATransaction`.

`FlutterMetalLayer` is disabled by default. To opt-in, add the following
item to `Info.plist`:

```xml
        <key>FLTUseFlutterMetalLayer</key>
	<true/>
```

The performance seems quite good, consistent 120hz on iPhone 13 Pro.

Benefits
- presenting with transaction from background thread, which, down the
line, would allow for platform views without thread merging.
- fine control over how the surface is displayed - we can display single
surface on multiple `CALayers`, each showing different part, allowing
for performant implementation of unobstructed platform views.
 
Drawbacks
- this not being a metal layer makes working with metal instrument tools
more awkward
2023-12-16 21:53:32 +01:00
Zachary Anderson
aa3f8e61c1 Moves expat, ocmock, libjpeg-turbo, libwebp, and wuffs to //flutter/third_party (flutter/engine#48193)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.

This PR moves expat, ocmock, libjpeg-turbo, libwebp, and wuffs to
//flutter/third_party.

It also deletes //third_party/fontconfig, which was unused.
2023-11-19 22:53:29 -08:00
hellohuanlin
a0e967921b [platform_view] fix overlapping platform view not touchable (flutter/engine#39527)
* [platform_view]fix overlapped platform view not touchable

* scenario test

* nit

* actually fix todo
2023-02-21 23:53:20 +00:00
Jenn Magder
1b4ce3fa8b Use arm64 engine variant on simulators in iOS unit tests (flutter/engine#39213) 2023-01-28 00:16:47 +00:00
WenJingRui
d36bf1d5e3 [iOS] Avoid keyboard animation junk and laggy on Promotion devices. (flutter/engine#34871) 2022-08-18 22:26:00 +00:00
Yang Chao
29320bfd1e Fix an issue that deleting an emoji may crash the app (flutter/engine#34508) 2022-07-25 16:59:03 +00:00
Chris Yang
cd0ced63e5 Reland "iOS spell-checker ObjC #32941" (flutter/engine#34356) 2022-07-11 23:29:04 +00:00
gaaclarke
166029f3a1 Added flag to disable the dart profiler on iOS (flutter/engine#33907) 2022-06-08 12:28:04 -07:00
gaaclarke
3800433d1d Added plist flag for enabling trace-systrace. (flutter/engine#33889) 2022-06-08 09:08:06 -07:00
Chris Yang
3720c4dff0 Revert "iOS spell-checker ObjC" (flutter/engine#33570) 2022-05-23 19:08:05 -07:00
Chris Yang
8bbe46106a iOS spell-checker ObjC (flutter/engine#32941) 2022-05-19 12:28:06 -07:00
Jami Couch
2397cf14a9 Add support for iOS UndoManager (flutter/engine#31415) 2022-05-11 12:09:06 -07:00
Chris Yang
fc54e5ecac Set iOS default frame rate to screen max. (flutter/engine#29797) 2022-04-01 14:34:47 -07:00
Zachary Anderson
1f2acee85b Adds a plist flag for Impeller (flutter/engine#32157) 2022-03-21 09:35:26 -07:00
George Wright
4e871bb6db Add an iOS benchmarks template app (flutter/engine#31269) 2022-02-07 15:57:55 -08:00
eggfly
85fe32c0d3 Add a custom switch to clean up the leaked Dart VM (flutter/engine#30541) 2022-01-20 23:20:10 -08:00
Jenn Magder
cb6cd0a3e8 Update IosUnitTests to use iPhone 11 simulator (flutter/engine#30090) 2021-12-03 10:49:02 -08:00
Jenn Magder
f9f6708037 Set MinimumOSVersion in iOS Info.plist based on buildroot setting (flutter/engine#28743) 2021-09-22 14:38:02 -07:00
Jenn Magder
693dd0381c Support iOS universal links route deep linking (flutter/engine#27874) 2021-08-09 14:35:11 -07:00
Jenn Magder
66134f5875 Embed OCMock and iOS tests into IosUnitTests app (flutter/engine#27899) 2021-08-05 09:50:02 -07:00
Jenn Magder
ef50866478 Unskip iOS launch URL tests (flutter/engine#27854) 2021-08-04 18:37:05 -07:00
Greg Spencer
185d8601c5 Hardware Keyboard: iOS (flutter/engine#25961)
Implement new keyboard event system for iOS.
2021-07-07 16:52:04 -07:00
gaaclarke
78b1abc9c4 Turned no malloc scribble and randomized the tests. (flutter/engine#23014) 2020-12-17 15:14:15 -08:00
Kaushik Iska
5fe332317b Reland [ios] Refactor IOSSurface factory and unify surface creation (flutter/engine#22016) 2020-10-29 11:58:03 -07:00
Dan Field
1c9b3e2299 Ocmock dylib (flutter/engine#21786)
- Build OCMock as a dylib for iOS tests
- Set install_name for ios_flutter_test and ocmock dylibs
- Copy and sign dylibs during build process
2020-10-13 09:36:29 -07:00
xster
8e3ed9ca9f Delete unused iOS test scripts after LUCI change (flutter/engine#18712)
This deletes old LUCI build scripts that have been unused since
https://flutter-review.googlesource.com/c/recipes/+/3160
2020-09-09 18:22:45 -07:00
Mehmet Fidanboylu
fd10b885d8 Enable iOS plumbing for network security and add tests (flutter/engine#20492) 2020-08-16 21:20:26 -07:00
Dan Field
4d8aaaa337 Make sure ios tests fail if they fail (flutter/engine#20518)
* Make sure ios tests fail if they fail

* explain
2020-08-14 10:11:37 -07:00
xster
5ac78f5be6 Refactor initial route code take 2 (flutter/engine#20468) 2020-08-13 14:18:11 -07:00
gaaclarke
232d6c4fca Revert "Refactor initial route code (#19684)" (flutter/engine#20450)
This reverts commit 21404b56c6c183a829d9c758bec2330155e2d86d.
2020-08-12 12:43:08 -07:00
xster
21404b56c6 Refactor initial route code (flutter/engine#19684) 2020-08-11 19:52:04 -07:00
Jenn Magder
1aa5f8cd66 Turn off failing XCTest attachment collection (flutter/engine#19668) 2020-07-14 09:06:03 -07:00
Jenn Magder
51ef62b895 Remove xcpretty from unit tests to see full output on test failures (flutter/engine#19667) 2020-07-13 15:48:42 -07:00
xster
410947a88e Make the testing process on different platforms more consistent (flutter/engine#18660) 2020-05-29 18:11:26 -07:00
Kaushik Iska
686b4af73f Update the observatory thread name for profiling thread (flutter/engine#18199) 2020-05-15 12:28:10 -07:00
Kaushik Iska
834cfb021e Add ocmock to iOS unit tests xcode project (flutter/engine#18396) 2020-05-14 19:42:02 -07:00
xster
664700007c Fix accessibility focus loss when first focusing on text field (flutter/engine#17803) 2020-04-24 15:44:54 -07:00
gaaclarke
43dffbd739 Added some tests after the fact for #17499 (flutter/engine#17714) 2020-04-15 11:52:52 -07:00
gaaclarke
3849b114d4 Made it so unit tests can be written against all ios engine code. (flutter/engine#17624) 2020-04-13 12:34:54 -07:00
gaaclarke
bbae0c06d4 Enabled hiding the home indicator with SystemChrome.setEnabledSystemUIOverlays (flutter/engine#17574) 2020-04-09 09:43:38 -07:00
LongCatIsLooong
d6d4f376a1 iOS UITextInput autocorrection prompt (flutter/engine#13959) 2020-04-07 14:45:59 -07:00
LongCatIsLooong
530cf1c010 Reland "Bump simulator version in IosUnitTests & scenario app in preparation for luci xcode 11 migration (#15316)", Reverted in #15313
This reverts commit e1c106dc703463880013285c0c137540dc3ceec4.
2020-01-08 12:06:15 -08:00