241 Commits

Author SHA1 Message Date
Dan Field
ad95a1aa04 dart analysis of tests, cleanup (flutter/engine#13033) 2019-10-09 15:13:29 -07:00
Greg Spencer
1adf6d2ed0 Add missing focusable testing info (flutter/engine#13013)
This adds a couple of instances of semantic node isFocusable info that were missing that the framework testing depends upon.
2019-10-09 09:00:24 -07:00
Chinmay Garde
3873eeabb6 Compile sanitizer suppressions list and file bugs as necessary. (flutter/engine#12991) 2019-10-08 11:33:26 -07:00
chunhtai
79ad29854f add windows embedding test (flutter/engine#12423) 2019-10-03 12:42:44 -07:00
Chris Yang
adbe301950 Remove unused imports in the scenario app (flutter/engine#12728) 2019-10-02 04:19:19 +08:00
Chris Yang
1365a37886 Reland "Add iOS platform view mutation XCUITests to the scenario app(#11652)" (flutter/engine#12707) 2019-10-02 01:51:31 +08:00
gaaclarke
d318cbd7da Resize channel buffers (flutter/engine#12402)
Made it so you can resize channel buffers by sending messages to them.
2019-10-01 10:31:25 -07:00
Chris Yang
97699cc609 Adding 'pub get' to the 'compile_xxxx.sh' in the Scenario app (flutter/engine#12699) 2019-10-01 04:10:11 +08:00
gaaclarke
2aea717b71 Started asserting the FlutterEngine is running before communicating over channels. (flutter/engine#12469)
Started asserting the FlutterEngine is running before communicating
over channels.  This changes a null pointer exception to an
NSException that will provide some meaningful data to clients
incorrectly using the engine in an add-to-app situations.
2019-09-27 15:18:45 -07:00
Jonah Williams
c341326d6a Add support for JIT release mode (flutter/engine#12446) 2019-09-27 11:20:54 -07:00
Gary Qian
2109f77212 Make kDoNotResizeDimension public so framework can use it directly (flutter/engine#12448) 2019-09-26 17:07:16 -04:00
gaaclarke
1cad708800 Added unit tests for method channels. (flutter/engine#12373)
Added unit tests for method channels.
2019-09-20 14:25:56 -07:00
Dan Field
e4a8130bc6 skip flaky test (flutter/engine#12355) 2019-09-18 21:43:11 -07:00
Chinmay Garde
c8ecb03fa8 Account for root surface transformation on the surfaces managed by the external view embedder. (flutter/engine#11384)
The earlier design speculated that embedders could affect the same
transformations on the layers post engine compositor presentation but before
final composition.

However, the linked issue points out that this design is not suitable for use
with hardware overlay planes. When rendering to the same, to affect the
transformation before composition, embedders would have to render to an
off-screen render target and then apply the transformation before presentation.
This patch negates the need for that off-screen render pass.

To be clear, the previous architecture is still fully viable. Embedders still
have full control over layer transformations before composition. This is an
optimization for the hardware overlay planes use-case.

Fixes b/139758641
2019-09-17 15:16:59 -07:00
Chinmay Garde
7dda245874 Shuffle test order and repeat test runs once. (flutter/engine#12275)
The tests we write must be resilient to the order in which they are run in the
harness. That is, they must not rely on global state set by other tests that
have already run in the process. Also, these tests must themselves be
repeatable. That is, they must correctly clean up after themselves and be able
to run successfully again in the same process.

This patch adds some safeguards against (but does NOT guarantee) the addition of
tests that violate the dictum.

Additionally, test failures must be easily reproducible for folks investigating
the test failure. Also, tests that assert correctness of unrelated code must not
stop progress on the authors patch.

This changes does not hinder reproducibility of test failures because the random
seed is printed in the logs before running each test. Developers attempting to
reproduce the failure locally can do the same via the following invocation
`--gtest_shuffle --gtest_repeat=<the count> --gtest_random_seed=<seed from failing run>`.

This change does introduce potential burden on patch authors that may see
failures in unrelated code as a newly failing shuffle seed is used on their
runs. To ameliorate this, we will formulate guidance for them to aggressively
mark such tests as disabled and file bugs to enable the same.

The test seed is intentionally kept low because it’s purpose is to test that
individual tests are repeatable. It must not be used as a replacement for
fuzzing.
2019-09-17 14:50:51 -07:00
gaaclarke
402a8a452e Channel buffers (flutter/engine#12167)
Added channel buffers to 'ui' so that messages have a place to
go until message handling is setup.
2019-09-17 12:22:00 -07:00
xster
e8717143e9 Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (flutter/engine#12128) 2019-09-17 12:00:46 -07:00
Kaushik Iska
1e34d6a443 Revert "Add iOS platform view mutation XCUITests to the scenario app (#11652)" (flutter/engine#12292)
This reverts commit f2eb1d4bd779accbc293edcf62826fbf48d166ad.
2019-09-15 17:57:54 -07:00
Chris Yang
f2eb1d4bd7 Add iOS platform view mutation XCUITests to the scenario app (flutter/engine#11652) 2019-09-16 07:56:24 +08:00
xster
c668dad587 Clean up after AppLifecycleTests (flutter/engine#12273) 2019-09-13 13:28:54 -07:00
xster
6e2b87462f Reland add some AppLifecycleTests 2019-09-13 10:34:36 -07:00
Alexander Aprelev
b5262e86d7 Revert "Add some AppLifecycleTests (#11890)" (flutter/engine#12264)
This reverts commit ac38d33fbf57f0887de0ae231fd6fc125f3db629 as it breaks mac tests https://ci.chromium.org/p/flutter/builders/prod/Mac%20Host%20Engine/2156.
2019-09-13 09:16:03 -07:00
xster
ac38d33fbf Add some AppLifecycleTests (flutter/engine#11890) 2019-09-12 16:36:30 -07:00
Jenn Magder
2e1bb190d1 Remove ENABLE_BITCODE from Scenarios test app (flutter/engine#11839) 2019-09-09 12:10:31 -07:00
Kaushik Iska
2d656f6f32 Revert "Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)" (flutter/engine#12055)
This reverts commit 9297908d54bf20f8cd8dd81849c95ff8528683e3.
2019-09-06 18:12:16 -07:00
George Wright
9297908d54 Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#11798)
Manage resource and onscreen contexts using separate IOSGLContext objects
2019-09-06 16:44:49 -07:00
xster
12e8ba8313 remove extra redundant channels setup in iOS embedding engine (flutter/engine#11886) 2019-09-05 11:13:04 -07:00
liyuqian
df4c16f947 Revert "Add a BroadcastStream to FrameTiming (#11041)" (flutter/engine#11841)
This reverts commit 226c44ba3c24cd89b4e47d0ce59b21ac7af6946e.

Reason for revert: Stream is considered a bad API: https://github.com/flutter/engine/pull/11041#issuecomment-526892247
2019-09-05 10:41:55 -07:00
Matt Carroll
f7035552b3 Updated API usage in scenario app by deleting unnecessary method. (flutter/engine#11844) 2019-09-03 19:25:54 -07:00
xster
575ad9c7b3 Let java unit tests build with autoninja (flutter/engine#11799) 2019-08-30 20:10:29 -07:00
Michael Klimushyn
c65fb9cdc1 Assert that the JUnit tests are running on Java 8 (flutter/engine#11466) 2019-08-27 10:38:52 -07:00
Chris Bracken
116b9729ec Ensure trailing newline before EOF in C++ sources (flutter/engine#11489)
In generated text fixture location lookup code:
When the second argument to write_file() is a list, it is written one
item per line to the path specified by the first argument. This ensures
that we emit a trailing newline at EOF to comply with -Wnewline-eof.

Elsewhere:
Lack of a newline at EOF was undefined behaviour prior to C++11. The
Fuchsia tree sets -Wnewline-eof in its buildroot, so we plan to do the
same. This cleans up remaining first-party C++ sources that don't
include a trailing newline.
2019-08-27 00:13:00 -07:00
Amir Hardon
d857db54ce Skip empty platform view overlays. (flutter/engine#11427)
This change sets up a "spying canvas" to try and detect empty canvases.
When using platform views with a custom embedder, if a platform view
overlay canvas is known to be empty we skip creating a compositor layer
for that overlay.
2019-08-26 11:40:49 -07:00
liyuqian
f8f285edcc Support non-60 refresh rate on PerformanceOverlay (flutter/engine#11419)
So we can get the correct graph on 90fps/120fps devices :)

See https://github.com/flutter/flutter/issues/37888
2019-08-24 15:22:52 -07:00
Chinmay Garde
05d4ab774d Remove deprecated ThreadTest::GetThreadTaskRunner and use the newer CreateNewThread API. (flutter/engine#11395)
We will end up creating fewer threads in tests.
2019-08-23 12:21:46 -07:00
Dan Field
37ef15db7b Update scenarios readme (flutter/engine#11374)
This is out of date.
2019-08-22 11:12:04 -07:00
Dan Field
4edf156fd4 update sim script (flutter/engine#11355) 2019-08-21 13:10:34 -07:00
Dan Field
8bc66b6451 Firebase test for Platform Views on iOS (flutter/engine#11350) 2019-08-21 12:48:39 -07:00
Chinmay Garde
9326ee2551 Reference the Flutter framework instead of the dylib in iOS tests. (flutter/engine#11337) 2019-08-21 00:04:01 -07:00
Dan Field
5e6117503b Add tests for platform views (flutter/engine#11319) 2019-08-20 20:48:40 -07:00
liyuqian
226c44ba3c Add a BroadcastStream to FrameTiming (flutter/engine#11041)
Without this, developers have to override `onReportTimings` to listen for `FrameTiming`.
That can potentially break previous `onReportTimings` listeners if they forget to call
the old listener in their new callback.

This PR replaces the similar RP in the framework: https://github.com/flutter/flutter/pull/38574

Once this PR landed, we'll have to create another framework PR to use the stream to replace
`onReportTimings` usages.

Once that's done, we can then propose the breaking change of removing the deprecated
`onReportTimings`.
2019-08-19 10:52:16 -07:00
Michael Klimushyn
ca63162ed9 Minor update to the Robolectric test harness (flutter/engine#11067)
Make sure that any `android.util.Log`s during the tests are reported to
stdout.
2019-08-16 16:25:59 -07:00
Shi-Hao Hong
cb707fb34a Pass Android Q insets.systemGestureInsets to Window (flutter/engine#10413)
* Pass Android Q system gesture inset information from insets.systemGestureInsets to Window.systemGestureInsets
2019-08-16 13:42:56 -04:00
liyuqian
3a94682272 Hide verbose dart snapshot during run_test.py (flutter/engine#11040)
Without this change, a single dart test will print out 306 lines.
With this change, a single dart test will only print out 33 lines.
This helps a lot in local tests.

In order to return to the old logging, set `--verbose-dart-snapshot` flag.
2019-08-15 16:40:30 -07:00
Matt Carroll
b4d4a675d4 Re-lands platform brightness support on iOS, plus platform contrast (flutter/engine#10791) 2019-08-15 14:51:07 -07:00
Dan Field
8faa7a1b1c remove OS version (flutter/engine#11033) 2019-08-15 13:42:19 -07:00
Dan Field
866785b74f Add script for running ios Tests on simulator (flutter/engine#10999) 2019-08-14 12:43:33 -07:00
Dan Field
16c2058bf2 Add isDisplayingFlutterUI to FlutterViewController (flutter/engine#10816) 2019-08-14 09:10:22 -07:00
Chinmay Garde
591f55b39d Allow embedder controlled composition of Flutter layers. (flutter/engine#10195)
This patch allows embedders to split the Flutter layer tree into multiple
chunks. These chunks are meant to be composed one on top of another. This gives
embedders a chance to interleave their own contents between these chunks.

The Flutter embedder API already provides hooks for the specification of
textures for the Flutter engine to compose within its own hierarchy (for camera
feeds, video, etc..). However, not all embedders can render the contents of such
sources into textures the Flutter engine can accept. Moreover, this composition
model may have overheads that are non-trivial for certain use cases. In such
cases, the embedder may choose to specify multiple render target for Flutter to
render into instead of just one.

The use of this API allows embedders to perform composition very similar to the
iOS embedder. This composition model is used on that platform for the embedding
of UIKit view such and web view and map views within the Flutter hierarchy.
However, do note that iOS also has threading configurations that are currently
not available to custom embedders.

The embedder API updates in this patch are ABI stable and existing embedders
will continue to work are normal. For embedders that want to enable this
composition mode, the API is designed to make it easy to opt into the same in an
incremental manner.

Rendering of contents into the “root” rendering surface remains unchanged.
However, now the application can push “platform views” via a scene builder.
These platform views need to handled by a FlutterCompositor specified in a new
field at the end of the FlutterProjectArgs struct.

When a new platform view in introduced within the layer tree, the compositor
will ask the embedder to create a new render target for that platform view.
Render targets can currently be OpenGL framebuffers, OpenGL textures or software
buffers. The type of the render target returned by the embedder must be
compatible with the root render surface. That is, if the root render surface is
an OpenGL framebuffer, the render target for each platform view must either be a
texture or a framebuffer in the same OpenGL context. New render target types as
well as root renderers for newer APIs like Metal & Vulkan can and will be added
in the future. The addition of these APIs will be done in an ABI & API stable
manner.

As Flutter renders frames, it gives the embedder a callback with information
about the position of the various platform views in the effective hierarchy.
The embedder is then meant to put the contents of the render targets that it
setup and had previously given to the engine onto the screen (of course
interleaving the contents of the platform views).

Unit-tests have been added that test not only the structure and properties of
layer hierarchy given to the compositor, but also the contents of the texels
rendered by a test compositor using both the OpenGL and software rendering
backends.

Fixes b/132812775
Fixes flutter/flutter#35410
2019-08-13 14:53:19 -07:00
Dan Field
4ea3a6b031 Expose isolateId for engine (flutter/engine#10823) 2019-08-12 21:20:59 -07:00