Compatibility pass on flutter/widgets tests for JavaScript compilation. (8)#33377
Compatibility pass on flutter/widgets tests for JavaScript compilation. (8)#33377jonahwilliams merged 8 commits intoflutter:masterfrom
Conversation
| ); | ||
| debugDefaultTargetPlatformOverride = null; | ||
| }, skip: !Platform.isLinux); | ||
| }, skip: identical(0, 0.0) || !Platform.isLinux); |
There was a problem hiding this comment.
we should factor out this test into some constant somewhere, like isCompiledToJS or something
There was a problem hiding this comment.
also, we should factor out Platform in general, so that we have an equivalent of !Platform.isLinux that is true on Web and false on Linux.
| matchesGoldenFile('clip.ClipRect.1.png'), | ||
| ); | ||
| }); | ||
| }, tags: 'golden'); |
There was a problem hiding this comment.
I'm not sure we can implement this on the Web due to browser restrictions. Possible alternatives to tags:
- Make
matchesGoldenFilealways succeed on the Web (the downside is users may incorrectly assume their tests are passing when they actually fail). - Create a
testGoldenthat's a sibling oftestWidgets.testGoldenonly runs influtter_testerand never on the Web.
There was a problem hiding this comment.
cc @Piinks who is working on redoing how goldens work
There was a problem hiding this comment.
There is a way to do golden testing on the web, but it might require a slightly different API. Its possible to ask chrome via devtools (on the server side) for a screenshot of particular dimensions.
We would need to move the comparison to the backend and use package:tests's communication channel to forward to result of the comparison. I can write up a small one-pager on what this looks like
There was a problem hiding this comment.
I meant we may not be able to take a screenshot of a widget. But now that I looked at Flutter's implementation, all it does is create a standalone Scene and takes a screenshot of that. Perhaps we could do the same by rendering the scene into a separate iframe.
There was a problem hiding this comment.
You can ask chrome (from the serving side) for a screen shot at particular dimensions, and we can get those from the layer tree presumably.
There was a problem hiding this comment.
May be a minor distinction, but if one layer appears on top of another layer, will Chrome isolate the layer that's being screenshotted? That's what Flutter does.
There was a problem hiding this comment.
ahh good point, I'm not sure - though I doubt our concept of a layer lines up nicely with Chrome's even if it was supported.
There was a problem hiding this comment.
If you can capture a screenshot, you can test it using the gold process I've been working on. There's a number of ways you can differentiate web screenshots from others from implementing unique naming conventions to distinguish platform-specific tests or a unique config/key:value pair for a given test. I have a design doc laying out the possible workflows with gold.
|
Updated to address comments, include newly failing tests, and run on CI |
|
flutter_web is not accepted by our lints, TIL |
commit 92e52d5 Merge: 421e4e4 da6dde6 Author: jonahwilliams <[email protected]> Date: Wed Jun 12 14:12:36 2019 -0700 Merge branch 'master' of github.com:flutter/flutter into add_network_image_impl commit 421e4e4 Author: jonahwilliams <[email protected]> Date: Wed Jun 12 14:03:11 2019 -0700 address comments commit da6dde6 Author: engine-flutter-autoroll <[email protected]> Date: Wed Jun 12 16:49:55 2019 -0400 Roll engine ab5c14b..67aadb6 (2 commits) (flutter#34350) flutter/engine@ab5c14b...67aadb6 git log ab5c14b..67aadb6 --no-merges --oneline 67aadb6 Roll src/third_party/skia d62d406aa24c..81756e4cae95 (5 commits) (flutter/engine#9300) 0a2e28d Revert tracing changes (flutter/engine#9296) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 8163c0a Author: Todd Volkert <[email protected]> Date: Wed Jun 12 13:47:47 2019 -0700 Re-apply compressionState changes. (flutter#34341) This re-applies the changes that were made in flutter#33697 and flutter#33729, but which were reverted in flutter#33792 and flutter#33790, respectively due to the Dart SDK not having received the update within Google yet. The SDK has now rolled, so these changes can be re-applied. flutter#32374 flutter#33791 commit 25c8400 Author: Devon Carew <[email protected]> Date: Wed Jun 12 13:14:20 2019 -0700 Revert "update the Flutter.Frame event to use new engine APIs (flutter#34243)" (flutter#34352) This reverts commit 446179f. commit c40d701 Author: Jenn Magder <[email protected]> Date: Wed Jun 12 11:31:17 2019 -0700 Change Xcode project developmentRegion to 'en' and plist CFBundleDevelopmentRegion to DEVELOPMENT_LANGUAGE (flutter#34293) commit 446179f Author: Devon Carew <[email protected]> Date: Wed Jun 12 11:20:10 2019 -0700 update the Flutter.Frame event to use new engine APIs (flutter#34243) * update the Flutter.Frame event to use new engine APIs * add a test * update test commit 22ca3f9 Author: Zachary Anderson <[email protected]> Date: Wed Jun 12 11:18:53 2019 -0700 [flutter_tool] Don't truncate verbose logs from _flutter.listViews (flutter#34255) commit 75b5cec Author: engine-flutter-autoroll <[email protected]> Date: Wed Jun 12 14:03:56 2019 -0400 ab5c14b Set Dart version to git hash 3166bbf24b0c929eef33fd5d0f69e0f36a9009f3 (Dart 2.3.3-dev) (flutter/engine#9292) (flutter#34336) flutter/engine@d3c213e...ab5c14b git log d3c213e..ab5c14b --no-merges --oneline ab5c14b Set Dart version to git hash 3166bbf24b0c929eef33fd5d0f69e0f36a9009f3 (Dart 2.3.3-dev) (flutter/engine#9292) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit fb2f18e Author: Todd Volkert <[email protected]> Date: Wed Jun 12 10:22:50 2019 -0700 Prepare for Uint8List SDK breaking changes (flutter#34295) dart-lang/sdk#36900 commit bdd0724 Author: engine-flutter-autoroll <[email protected]> Date: Wed Jun 12 13:03:55 2019 -0400 Roll engine b14d971..d3c213e (3 commits) (flutter#34331) flutter/engine@b14d971...d3c213e git log b14d971..d3c213e --no-merges --oneline d3c213e Roll src/third_party/skia 698fa78b3cae..d62d406aa24c (1 commits) (flutter/engine#9295) 4d7afb9 Roll src/third_party/skia ed7966f179c6..698fa78b3cae (1 commits) (flutter/engine#9294) 05e1b6e Roll src/third_party/skia d82ca0bf2c99..ed7966f179c6 (2 commits) (flutter/engine#9293) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit fa174a1 Author: engine-flutter-autoroll <[email protected]> Date: Wed Jun 12 00:45:55 2019 -0400 Roll engine 4fc95eb..b14d971 (4 commits) (flutter#34310) flutter/engine@4fc95eb...b14d971 git log 4fc95eb..b14d971 --no-merges --oneline b14d971 Roll src/third_party/skia f39124b0764d..d82ca0bf2c99 (3 commits) (flutter/engine#9291) 87c26ae Refactor Delayed Tasks to their own file (flutter/engine#9290) 9baf589 [iOS] [a11y] Don&flutter#39;t allow scroll views to grab a11y focus (flutter/engine#9282) f80ac5f [fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (flutter/engine#9289) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 70840d4 Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 23:41:58 2019 -0400 4fc95eb Fixed memory leaks within FlutterFragment and FlutterView (flutter#34268, flutter#34269, flutter#34270). (flutter/engine#9288) (flutter#34305) commit d6425a2 Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 21:54:55 2019 -0400 Roll engine 2d2cfc0..de350c4 (2 commits) (flutter#34302) flutter/engine@2d2cfc0...de350c4 git log 2d2cfc0..de350c4 --no-merges --oneline de350c4 Report timings faster (100ms) in profile/debug (flutter/engine#9287) 6dc4d6c Add refresh callback to GLFW shell (flutter/engine#9280) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 9a46b3e Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 20:17:55 2019 -0400 Roll engine 02e6a13..2d2cfc0 (3 commits) (flutter#34292) flutter/engine@02e6a13...2d2cfc0 git log 02e6a13..2d2cfc0 --no-merges --oneline 2d2cfc0 Expose a hasRenderedFirstFrame() method in FlutterView (flutter#34275). (flutter/engine#9285) 8040117 Fix TextInputPlugin NPE caused by PlatformViewsController ref in new embedding (flutter#34283). (flutter/engine#9283) c7b25f1 Roll src/third_party/skia df586b7d568d..f39124b0764d (11 commits) (flutter/engine#9284) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 21a5326 Author: Emmanuel Garcia <[email protected]> Date: Tue Jun 11 16:24:03 2019 -0700 Split gradle_plugin_test.dart (flutter#34282) Fixes timeout when running gradle_plugin_test commit 8247963 Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 18:30:55 2019 -0400 Roll engine 4d68474..02e6a13 (4 commits) (flutter#34281) flutter/engine@4d68474...02e6a13 git log 4d68474..02e6a13 --no-merges --oneline 02e6a13 Roll src/third_party/dart 7ecd81b0b8..b37aa3b036 (4 commits) (flutter/engine#9272) 95f9b3d Fix crash on minimize with GLFW shell (flutter/engine#9278) 8d017fa Roll src/third_party/skia a716809d5ad3..df586b7d568d (17 commits) (flutter/engine#9279) 10a3ab0 Fix missing return lint (flutter/engine#9246) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 9d724d4 Author: Jonah Williams <[email protected]> Date: Tue Jun 11 14:51:03 2019 -0700 Compatibility pass on flutter/widgets tests for JavaScript compilation. (8) (flutter#33377) commit d9c1962 Author: Emmanuel Garcia <[email protected]> Date: Tue Jun 11 14:46:00 2019 -0700 Instrument usage of include_flutter.groovy and xcode_backend.sh (flutter#34189) This is done via `flutter build bundle`. As a consequence, this PR introduces a new way to disable analytics via the `FLUTTER_SUPPRESS_ANALYTICS` env flag. commit 1eb8c64 Author: LongCatIsLooong <[email protected]> Date: Tue Jun 11 14:14:54 2019 -0700 Fix CupertinoTabScaffold index out of range (flutter#33624) commit 89d887f Author: Jason Simmons <[email protected]> Date: Tue Jun 11 13:34:24 2019 -0700 Strip debug symbols from ELF library snapshots (flutter#34250) AOT compiled code is now packaged as an ELF library for Android targets. By default gen_snapshot's output contains debug symbols. The symbols could be stripped as a separate step, but that requires NDK tools that the user may not have available. This change passes a gen_snapshot flag that omits the symbols, and it filters out a warning printed when that flag is used. commit 6d0e618 Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 15:55:56 2019 -0400 Roll engine de420a0..4d68474 (3 commits) (flutter#34258) flutter/engine@de420a0...4d68474 git log de420a0..4d68474 --no-merges --oneline 4d68474 Load AOT compiled Dart assets only from ELF libraries (flutter/engine#9260) 3e9ffe1 Whitelist the —enable_mirrors flag to fix regression in existing embedder. (flutter/engine#9266) 7cde42c Unbreak internal rolls (flutter/engine#9270) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit e59d9a8 Author: Ben Konyi <[email protected]> Date: Tue Jun 11 11:37:47 2019 -0700 Reland "Added --dart-flags option to flutter run (flutter#33924)" (flutter#34181) Reland "Added --dart-flags option to flutter run (flutter#33924)" This reverts commit 587687e. commit 7cc7161 Author: Jonah Williams <[email protected]> Date: Tue Jun 11 11:22:37 2019 -0700 Compatibility pass on flutter/semantics tests for JavaScript compilation. (7) (flutter#33360) commit 1bc8402 Author: guoskyhero <[email protected]> Date: Tue Jun 11 11:15:50 2019 -0700 Add hintStyle in SearchDelegate (flutter#30388) SearchDelegate hintStyle parameter commit 336e4c4 Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 14:12:56 2019 -0400 Roll engine c9bbd0e..de420a0 (4 commits) (flutter#34247) flutter/engine@c9bbd0e...de420a0 git log c9bbd0e..de420a0 --no-merges --oneline de420a0 Roll src/third_party/dart 97f91fecdb..7ecd81b0b8 (5 commits) (flutter/engine#9268) 8812781 Roll src/third_party/skia bba5aa761cd5..a716809d5ad3 (1 commits) (flutter/engine#9269) b470913 Roll src/third_party/skia 77cb2ca3c9aa..bba5aa761cd5 (3 commits) (flutter/engine#9267) 48ecbca Roll src/third_party/skia bb74990a11d9..77cb2ca3c9aa (1 commits) (flutter/engine#9265) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 7feddfd Author: Jonah Williams <[email protected]> Date: Tue Jun 11 10:35:10 2019 -0700 make sure this test doesnt run for real (flutter#34199) commit d850d69 Author: Neevash Ramdial <[email protected]> Date: Tue Jun 11 12:57:17 2019 -0400 Added tool sample for PageController (flutter#34137) * Added tool sample for PageController * Fixed text directionality bug commit 05e92c8 Author: Jonah Williams <[email protected]> Date: Tue Jun 11 09:09:13 2019 -0700 Compatibility pass on flutter/physics tests for JavaScript compilation. (6) (flutter#33359) commit 30fb980 Author: engine-flutter-autoroll <[email protected]> Date: Tue Jun 11 11:41:47 2019 -0400 c9bbd0e Roll src/third_party/dart 7f146e431e..97f91fecdb (22 commits) (flutter#34203) commit e9ca112 Author: LongCatIsLooong <[email protected]> Date: Mon Jun 10 19:17:55 2019 -0700 update CupertinoDialogAction isDefaultAction documentation (flutter#34163) commit fcaf96d Author: engine-flutter-autoroll <[email protected]> Date: Mon Jun 10 21:35:55 2019 -0400 Roll engine f3ab2e4..4c0daac (2 commits) (flutter#34197) flutter/engine@f3ab2e4...4c0daac git log f3ab2e4..4c0daac --no-merges --oneline 4c0daac Roll src/third_party/skia cb1adb40d0f3..bb74990a11d9 (3 commits) (flutter/engine#9261) 2d0103a Removed VIRTUAL_KEYBOARD check in TextInputPlugin because it&flutter#39;s blocking Espresso work and its purpose is unknown. (flutter/engine#9238) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary. commit 89b1533 Author: jonahwilliams <[email protected]> Date: Mon Jun 10 16:49:44 2019 -0700 skip chunk test commit c11b61f Merge: b182271 1b3fc53 Author: jonahwilliams <[email protected]> Date: Mon Jun 10 16:49:34 2019 -0700 Merge branch 'master' of github.com:flutter/flutter into add_network_image_impl commit b182271 Author: jonahwilliams <[email protected]> Date: Mon Jun 10 16:14:06 2019 -0700 update to remove extra asset image indirection commit 96d7939 Merge: 3700e32 f530b80 Author: jonahwilliams <[email protected]> Date: Mon Jun 10 15:42:02 2019 -0700 Merge branch 'master' of github.com:flutter/flutter into add_network_image_impl commit 3700e32 Author: jonahwilliams <[email protected]> Date: Sat Jun 8 13:13:32 2019 -0700 fix foundation import commit e31b5e4 Author: jonahwilliams <[email protected]> Date: Sat Jun 8 13:09:19 2019 -0700 add web and io implemenations of network and asset image
* master: (84 commits) Compatibility pass on flutter/material tests for JavaScript compilation. (9) (flutter#33378) fix Applying decoration for a table row widget will cause render exception (flutter#34285) Add widget of the week videos (flutter#34356) Roll engine ab5c14b..67aadb6 (2 commits) (flutter#34350) Re-apply compressionState changes. (flutter#34341) Revert "update the Flutter.Frame event to use new engine APIs (flutter#34243)" (flutter#34352) Change Xcode project developmentRegion to 'en' and plist CFBundleDevelopmentRegion to DEVELOPMENT_LANGUAGE (flutter#34293) update the Flutter.Frame event to use new engine APIs (flutter#34243) [flutter_tool] Don't truncate verbose logs from _flutter.listViews (flutter#34255) ab5c14b Set Dart version to git hash 3166bbf24b0c929eef33fd5d0f69e0f36a9009f3 (Dart 2.3.3-dev) (flutter/engine#9292) (flutter#34336) Prepare for Uint8List SDK breaking changes (flutter#34295) Roll engine b14d971..d3c213e (3 commits) (flutter#34331) Roll engine 4fc95eb..b14d971 (4 commits) (flutter#34310) 4fc95eb Fixed memory leaks within FlutterFragment and FlutterView (flutter#34268, flutter#34269, flutter#34270). (flutter/engine#9288) (flutter#34305) Roll engine 2d2cfc0..de350c4 (2 commits) (flutter#34302) Roll engine 02e6a13..2d2cfc0 (3 commits) (flutter#34292) Split gradle_plugin_test.dart (flutter#34282) Roll engine 4d68474..02e6a13 (4 commits) (flutter#34281) Compatibility pass on flutter/widgets tests for JavaScript compilation. (8) (flutter#33377) Instrument usage of include_flutter.groovy and xcode_backend.sh (flutter#34189) ...
Description
Flags certain test cases in rendering using package:test tags in order to facilitate landing support for running all framework tests in a browser.
Requires #33349