61 Commits

Author SHA1 Message Date
Greg Spencer
21691f1ebb
Enable delayed event delivery for macOS (#21231)
This enables delayed event delivery for macOS, so that shortcuts can handle keys that are headed for a text field and intercept them. This fixes the problem where pressing TAB (or other shortcuts) in a text field also inserts a tab character into the text field.
2020-12-11 15:21:39 -08:00
Andy Weiss
176a2c0208
[embedder][glfw] Add support for locales to glfw shell (#22657)
The other linux shell (and all the other embedding) have support for
getting the locales from the system and sending them over the
flutter/localization channel. The glfw shell does not have that which is
causing a crash on an assert now that Locale is no longer nullable
in Platform.

This adds a similar approach to what is going on over in the other linux
shell.
2020-11-24 14:23:12 -08:00
stuartmorgan
9f207a3fc6
Add initial settings message to Windows embedding (#22323)
Sends the flutter/settings update message to the engine after starting
it. For now values other than 24-hour time preference are hard-coded,
but dark mode support can be added later.

Fixes https://github.com/flutter/flutter/issues/65590
2020-11-23 15:58:45 -08:00
Daco Harkes
ccdb6819ce
WeakPersistentHandle migration (#19843)
and roll Dart to 52783837369de45d3372cb6c6b7cdd63e71cd829.
2020-11-03 13:06:53 +01:00
stuartmorgan
caf32d5b28
Add a proc table version of embedder API (#21813) 2020-10-29 13:13:03 -07:00
Kaushik Iska
75bc9360d9
[macOS] flutter_desktop_darwin_unittests can be enabled for all runtime modes (#21681) 2020-10-08 10:12:03 -07:00
Kaushik Iska
2eac514f26
Run desktop darwin tests in debug mode (#21660) 2020-10-07 16:32:01 -07:00
Dan Field
634e499bcc
Use hint freed specifically for image disposal (#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Chris Bracken
14ac65c9a2
Extract Dart test utilities library (#20874)
This extracts a Dart test utilities library, containing
`expectAssertion` and `expectArgumentError` functions that simplify
running tests that test assertions across debug, profile, and release
configurations.

This change also restricts Dart unit tests to testing files whose
filename matches `*_test.dart` under `flutter/testing/dart`; previously
any file in that directory was run, but all files matched the above
pattern.
2020-08-30 11:07:05 -07:00
Gary Qian
02de4eb7ce
Update to android 30r2 and roll buildroot (#20479) 2020-08-17 16:33:48 -07:00
Dan Field
b32a2a5b05
Make sure ios tests fail if they fail (#20518)
* Make sure ios tests fail if they fail

* explain
2020-08-14 10:11:37 -07:00
xster
0c504da039
Refactor initial route code take 2 (#20468) 2020-08-13 14:18:11 -07:00
gaaclarke
2ac5b3460a
Revert "Refactor initial route code (#19684)" (#20450)
This reverts commit 8d08e6c369e349986831d83204a79af3fcb8d8ca.
2020-08-12 12:43:08 -07:00
xster
8d08e6c369
Refactor initial route code (#19684) 2020-08-11 19:52:04 -07:00
chunhtai
db8c40b3f3
fix FlutterViewUpdateCustomAccessibilityActions uses correct string list (#19623)
* fix FlutterViewUpdateCustomAccessibilityActions uses correct string list

* add test to ci

* format

* add license file

* fix test

* fix lint
2020-07-28 09:49:59 -07:00
Siva
be7595bafb
Use option --no-sound-null-safety instead of --no-null-safety (#19743) 2020-07-14 14:08:24 -07:00
Emmanuel Garcia
b990ad11bd
Implement external view embedder on Android (#19033)
The external view embedder allows to embed Android views in a Flutter app.
2020-06-20 12:51:55 -07:00
Yegor
194acdfaed
apply null safety syntax to mobile dart:ui (#18933)
* apply null safety syntax to mobile dart:ui
2020-06-12 12:42:12 -07:00
liyuqian
369e0a9b91
Add ui_benchmarks (#18945) 2020-06-11 10:55:03 -07:00
xster
3dfbe722b9
Make the testing process on different platforms more consistent (#18660) 2020-05-29 18:11:26 -07:00
xster
f3b7ed4078
Let run_tests.py just stream output (#18534) 2020-05-20 21:38:37 -07:00
Robert Ancell
805a8874cb
Add first Linux shell tests (#18159) 2020-05-06 15:33:11 +12:00
Emmanuel Garcia
eed05dd00d
Add initial unit tests for the android embedding (#17921) 2020-04-26 20:45:28 -07:00
Gary Qian
8dc91229b4
PlatformResolvedLocale localization message channel (#17755) 2020-04-21 15:34:44 -07:00
stuartmorgan
08ae3bb63e
Remove JSON codec from C++ client wrapper (#17312)
The JSON codec is awkward to use in the wrapper (since the client has to build and link one of the JSON libraries to do so). Since it would be very cumbersome to wrap in a C API, and there's essentially no reason to use it instead of the standard codec, this removes it from the wrapper entirely.

Since some system channels (internal to the engine) still use it, it's moved into common/cpp instead of being eliminated entirely. Internally we always use RapidJSON though, so the jsoncpp implementation is removed. Also adds some unit test coverage, since there wasn't any.

Fixes #30669
2020-04-02 14:57:46 -07:00
liyuqian
a82343befa
Add build_and_test_linux_release presubmit test (#17073) 2020-04-01 18:46:04 -07:00
stuartmorgan
710f738dd6
Allow relative resource paths in GLFW embedding (#16944)
Currently every Linux runner has this code to allow relative resource paths; this moves it into the framework so that any embedder can get this behavior without that code needing to be in the template.

Rolls buildroot to pick up std::filesystem support in our libc++
2020-03-17 19:04:18 -07:00
Dan Field
034f913b98
Teach frontend compiler to replace toString with super.toString for selected packages (#17068)
Adds annotation `keepToString` to opt out.
2020-03-17 15:40:09 -07:00
Emmanuel Garcia
025e2d82dd
Migrate embedding to AndroidX (#17075) 2020-03-13 21:19:24 -07:00
Chinmay Garde
fc1936fb3c
Make output of run_tests.py easier to understand. (#16229)
* The outputs of all commands are not printed and not just commands that fail.
* The stdout and stderr are now printed in order.
* Clear dividers mark logs from specific subprocesses or errors.
* The test whose run failed should now be exactly on top of the error message and code.
2020-01-29 20:47:35 -08:00
Chinmay Garde
2c64a06d4a
Disable GPUThreadMerger tests inline instead of via harness flags. (#15706) 2020-01-16 17:11:54 -08:00
Dan Field
8df1757d35
const finder (#15668) 2020-01-16 17:01:20 -08:00
Chinmay Garde
bbdafe0968
Disable fml_unittests till flakes are addressed. (#15676) 2020-01-15 12:04:36 -08:00
Dan Field
abaac56c60
Font subset (#14828) 2020-01-07 07:48:15 -08:00
Jim Graham
18d74fe45b
Show test output when engine unit test fails. (#14026) 2019-11-26 22:05:43 -08:00
Chinmay Garde
ed30d77ab9 Setup a Metal test surface and add a new unit-test target that tests the testing utilities.
`//flutter/testing` now contains a lot of utilities used by other test targets.
This includes stuff like working with render targets that use either OpenGL or
Metal, fixtures for interacting with the Dart VM, test assertion predicates,
etc.. However, these utilities themselves are not tested as part of a standalone
test suite. Instead, only the test targets that include it exercise these
utilities. Since these are no longer trivial, a new test target has been added
that tests the testing utilities directly.
2019-11-22 23:03:34 -08:00
Alexander Markov
ddceed5f7a
Cleanup obsolete --strong option of front-end server (#13735) 2019-11-07 13:34:55 -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
chunhtai
d33b91837e
Reland "fix fml_unittes is not run during presubmit (#13395)" (#13426) 2019-10-31 13:50:19 -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
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
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
chunhtai
daf1eb9a6a
add windows embedding test (#12423) 2019-10-03 12:42:44 -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
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
Michael Klimushyn
1e1eb4d34a
Minor update to the Robolectric test harness (#11067)
Make sure that any `android.util.Log`s during the tests are reported to
stdout.
2019-08-16 16:25:59 -07:00