260 Commits

Author SHA1 Message Date
chunhtai
fe0838e948
Revert "Added new lifecycle enum (#11913)" (#13632)
This reverts commit 02a479007420b05df8e075978ecdd15442ea520f.
2019-11-04 13:40:20 -08:00
chunhtai
02a4790074
Added new lifecycle enum (#11913) 2019-11-04 12:33:41 -08:00
gaaclarke
1af0e585b3
Disabled GPUThreadMerger tests. (#13480)
* Disabled GPUThreadMerger tests.

* switched to a single gtest_filter argument
2019-11-01 15:20:45 -07:00
Dan Field
21c049e202
Print the output (#13479) 2019-11-01 14:45:17 -07:00
Dan Field
a5243c024c
use check_output instead of check_call so that exceptions show the output. (#13478) 2019-11-01 11:17:15 -07:00
Amir Hardon
8997f34819
Fix stale platform view gr context on iOS (#13469)
When gr context is changed (this happens when sending the app to the background and then to the foreground) we need to update it for all the platform view overlay surfaces.

The update logic was caching the previous gr context to figure if it had to be updated, but after updating it for a given overlay we were updating the cached context. In apps with multiple platform views this will result in overlays with a stale gr context.

This fixes flutter/flutter#36437
And I believe it should fix flutter/flutter#36999 as well (though I don't have repro code to verify).
2019-10-31 16:51:11 -07:00
chunhtai
d33b91837e
Reland "fix fml_unittes is not run during presubmit (#13395)" (#13426) 2019-10-31 13:50:19 -07:00
Amir Hardon
c63aefd28b
Fix iOS crash when multiple platform views are in the scene (#13449)
Having 2 or more platform views simultaneously in the layer tree was crashing immediately on iOS with GL backend.

This regressed in #11070 which passed gl_context to a function in a loop using std::move (which meant on the second iteration the caller is no longer the owner of the field).

I added a scenarios_app test, though this test doesn't run on a physical device on CI so it would have only caught the problem when running locally (flutter/flutter#43852).
2019-10-31 10:30:15 -07:00
chunhtai
e569294902
Revert "fix fml_unittes is not run during presubmit (#13395)" (#13425)
This reverts commit 4d553cfe1cd7ec235af4f9d3952a974757cda49b.
2019-10-29 16:36:43 -07:00
chunhtai
4d553cfe1c
fix fml_unittes is not run during presubmit (#13395) 2019-10-29 15:31:25 -07:00
Jason Simmons
7069025a32
Reformat BUILD.gn files to comply with the format checker presubmit script (#13401) 2019-10-29 09:49:16 -07:00
George Wright
591d149f97
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations (#13273)
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations

This also modifies Shell::GetUIIsolateLastError() and Shell::EngineHasLivePorts() so that they must be called from the UI task runner.
2019-10-22 14:10:57 -07:00
Jason Simmons
4f85010d21
Do not attempt to drain the SkiaUnrefQueue in the destructor (#13237)
SkiaUnrefQueue should be empty at destruction time.  If the queue is nonempty,
then there will be a pending drain task that will hold a reference to the
queue.  The queue can only be destructed after the drain completes and the
reference is dropped.

Drains must only be done on the queue's task runner thread, which may not be
the thread where the queue is destructed.
2019-10-21 14:14:18 -07:00
Chinmay Garde
a925df1898
Remove incomplete static thread safety annotations. (#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
Chinmay Garde
b6858d2092
Use the fixtures mechanism for txt unit-tests and benchmarks. (#13180)
These tests and benchmarks can now be run without needing additional flags on the command line.
2019-10-16 16:29:55 -07:00
Matt Carroll
9acec4102a
Move initialization into FlutterEngine (#12806) 2019-10-11 16:15:55 -07:00
sjindel-google
d9080029af
Remove use of the blobs snapshot format from unittests (#12563)
* Remove uses of the "blobs" snapshot format in Engine tests.

* Comments

* Rebasing against updated ELF loader API.
2019-10-10 14:03:42 +02:00
Dan Field
0622b051b6
Minimal test harness for iOS (#13029) 2019-10-09 21:16:11 -07:00
Chinmay Garde
02c4bdf58a
Ignore thread leaks from Dart VM in tsan instrumented builds. (#13049) 2019-10-09 18:12:57 -07:00
Dan Field
6bd0ef3dfe
dart analysis of tests, cleanup (#13033) 2019-10-09 15:13:29 -07:00
Greg Spencer
77252d2371
Add missing focusable testing info (#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
25e2f038d1
Compile sanitizer suppressions list and file bugs as necessary. (#12991) 2019-10-08 11:33:26 -07:00
chunhtai
daf1eb9a6a
add windows embedding test (#12423) 2019-10-03 12:42:44 -07:00
Chris Yang
e45f690910
Remove unused imports in the scenario app (#12728) 2019-10-02 04:19:19 +08:00
Chris Yang
bf620dc568
Reland "Add iOS platform view mutation XCUITests to the scenario app(#11652)" (#12707) 2019-10-02 01:51:31 +08:00
gaaclarke
f407e06970
Resize channel buffers (#12402)
Made it so you can resize channel buffers by sending messages to them.
2019-10-01 10:31:25 -07:00
Chris Yang
138c3ff4bb
Adding 'pub get' to the 'compile_xxxx.sh' in the Scenario app (#12699) 2019-10-01 04:10:11 +08:00
gaaclarke
3c271bb942
Started asserting the FlutterEngine is running before communicating over channels. (#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
6f5eb1332f
Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
Gary Qian
0018135a1c
Make kDoNotResizeDimension public so framework can use it directly (#12448) 2019-09-26 17:07:16 -04:00
gaaclarke
933f83e303
Added unit tests for method channels. (#12373)
Added unit tests for method channels.
2019-09-20 14:25:56 -07:00
Dan Field
dd081bea03
skip flaky test (#12355) 2019-09-18 21:43:11 -07:00
Chinmay Garde
1c7300ed1e
Account for root surface transformation on the surfaces managed by the external view embedder. (#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
b4d8158316
Shuffle test order and repeat test runs once. (#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
0a455a8207
Channel buffers (#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
4159c2bfed
Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (#12128) 2019-09-17 12:00:46 -07:00
Kaushik Iska
289d1eaaa9
Revert "Add iOS platform view mutation XCUITests to the scenario app (#11652)" (#12292)
This reverts commit b73cfdad4f88ddfad6114c77633a0947f0c5fff5.
2019-09-15 17:57:54 -07:00
Chris Yang
b73cfdad4f
Add iOS platform view mutation XCUITests to the scenario app (#11652) 2019-09-16 07:56:24 +08:00
xster
e12decfdd2
Clean up after AppLifecycleTests (#12273) 2019-09-13 13:28:54 -07:00
xster
7d8c6d9c1a
Reland add some AppLifecycleTests 2019-09-13 10:34:36 -07:00
Alexander Aprelev
850d80c352
Revert "Add some AppLifecycleTests (#11890)" (#12264)
This reverts commit 46ff05346b1ecb7bbe0094f441ad8a256eda0a58 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
46ff05346b
Add some AppLifecycleTests (#11890) 2019-09-12 16:36:30 -07:00
Jenn Magder
a4de006f21
Remove ENABLE_BITCODE from Scenarios test app (#11839) 2019-09-09 12:10:31 -07:00
Kaushik Iska
35875e0f00
Revert "Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)" (#12055)
This reverts commit a353f93d370dded7bc7756082fbab8b519679d4d.
2019-09-06 18:12:16 -07:00
George Wright
a353f93d37
Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)
Manage resource and onscreen contexts using separate IOSGLContext objects
2019-09-06 16:44:49 -07:00
xster
dd71e7be8e
remove extra redundant channels setup in iOS embedding engine (#11886) 2019-09-05 11:13:04 -07:00
liyuqian
4243324a03
Revert "Add a BroadcastStream to FrameTiming (#11041)" (#11841)
This reverts commit e97ed36e580c9b4c4a3d768cfe1a520f7bf8161d.

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
3aafd0f971
Updated API usage in scenario app by deleting unnecessary method. (#11844) 2019-09-03 19:25:54 -07:00
xster
6a0ca8dc78
Let java unit tests build with autoninja (#11799) 2019-08-30 20:10:29 -07:00
Michael Klimushyn
0287144fa3
Assert that the JUnit tests are running on Java 8 (#11466) 2019-08-27 10:38:52 -07:00