* Split out the run_tests script to a build_and_run_tests script to make
it easier to run the tests on luci.
* Made build and run pass in its argument to run.
* Added unit tests for the ios code.
* Moved the tests to live next to the source.
* Added mocking library.
* Fixed formatting and removed third_party from the format check.
* fixed formatting 2
* Removed ocmock from third_party.
* Added ocmock to third_party, compile from source.
* removed ocmock from license checking
* updated licenses_flutter
* updated tool_signature
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.
Related issues:
https://github.com/flutter/flutter/issues/26154https://github.com/flutter/flutter/issues/31444https://github.com/flutter/flutter/issues/32447
Need review as soon as possible so we can merge this before the end of May to catch the milestone.
Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format
This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
* Allow specifying both Dart and non-Dart fixtures in engine unittests.
This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.
* Instead of only being able to specify Dart fixtures, unit-tests may specify
non-Dart fixtures as well. These are simply copied over to the fixtures
directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
has been addressed. It was anticipated that such a (legal) invocation to the
kernel snapshotter would produce a snapshot with the contents of all the Dart
files added to the root library. This is incorrect and the behavior in this
case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
arguments (`—strong`) and the use of the VM product mode argument has been
corrected to no longer depend on the Flutter product mode.
Remove the extra `decodedCacheRatioCap` parameter, and the
`_frameBitmaps` member from `Codec`. This means that small looped images
will consume more CPU but prevents us from hitting OOM exceptions based
on trying to render multiple larger images.
Also switch to fDisposalMethod for caching frames.
Previously we looped over every single SkCodec::FrameInfo, tracked its
`fRequiredFrame`, and then saved any frames matching those indeces.
Doing this instead avoids that initialization loop and extra data
structure.
* Dart side resize primitives exposed
* Write the codec side changes
* return un-scaled image if we can not allocate bitmap
* Format _instantiateImageCodec calls to be single lined
Move null check for size to be inner
* Address CR comments and make image resize dimensions container
* Round not trunc, also format
* Add tests, remove ImageResizeDims from api surface
* Make placeholder value public
* Make the api side changes
* Add a feature to resize pixels and also add tests
* Fix grammar and add more info
* Revert "fix toString (#8688)"
This reverts commit c9a0f50ecc62899952ff693ed67d022d510d9453.
* Revert "Make Rect and RRect use 64 bit doubles, and make them const-able (#8565)"
This reverts commit d98c2e2df0427aad3bd824f41d804ccc56eee367.
`//flutter/runtime: runtime_lifecycle_unittests` was added because the these assumed that there was no VM already running in the process. Running other tests in the base target would mess up that assumption. Now that all test targets have been updated to make sure the VM instance does not leak, the tests in this target can be merged.
LUCI bots don’t need to be patched as these tests were only ever run on the trybots.
When flutter/synchronization was first authored, we did not own fml (it was called fxl then). Now we do, so use a single spot for such utilities. The pipeline was meant to be a general purpose utility that was only ever used by the animator (it even has animator specific tracing), so move that to shell instead (where the animator resides).
Bugfix:
* Use the `pub` from within the built Dart SDK (not whatever's on
`$PATH`, if anything).
A few minor improvements:
* Allow running from below the src/ buildroot dir, as it's often
convenient to work from within the flutter/engine git dir.
* Echo test name before running, for slightly better debuggability.
* Minor line-wrapping for readability.
This reverts commit c416fe99ee0ddb464ca85c0b336d679ea626a03c.
Now we shouldn't break the engine build as https://chromium-review.googlesource.com/c/chromium/tools/build/+/1480746 is landed. The golden test is disabled by default and we'll enable it later in our recipe and test it in presubmit tests.
This breaks the Linux build with:
```
[ RUN ] PerformanceOverlayLayer.Gold
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
Actual: false
Expected: true
Golden file not found: "/b/s/w/ir/k/src/flutter/testing/resources"/performance_overlay_gold.png.
Please either set --golden-dir, or make sure that the unit test is run from the right directory (e.g., flutter/engine/src).
```
This reverts commit 3534a2c4cdfa35f921e99466013c7c8b3f03a8c3.
Reverting this broke the flow tests for the performance overlay:
```
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
Actual: false
Expected: true
```
This reverts commit ad96de250ecc47a7c26134ad434150199539b00b.
* Revert "Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)"
This reverts commit 284016b1e1d6e8badec99cbff907ddb900cd27c4.
* Add command line args for golden dir and font file
The shell was already designed to cleanly shut down the VM but it couldnt
earlier as |Dart_Initialize| could never be called after a |Dart_Cleanup|. This
meant that shutting down an engine instance could not shut down the VM to save
memory because newly created engines in the process after that point couldn't
restart the VM. There can only be one VM running in a process at a time.
This patch separate the previous DartVM object into one that references a
running instance of the DartVM and a set of immutable dependencies that
components can reference even as the VM is shutting down.
Unit tests have been added to assert that non-overlapping engine launches use
difference VM instances.