Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

xster
Copy link
Member

@xster xster commented Oct 21, 2020

Didn't have time to revise #20687 and merge it before. This would have actually helped catch flutter/flutter#68399 too I believe.

Original PR relates to flutter/flutter#60013. If user specifies a font that doesn't exist, it should properly fallback to the SF font and render it correctly.

Also removing the duplicate iPhone SE images as discussed with @blasten and refactor a modular golden test part out of the platform view stuff.

Also addresses flutter/flutter#68625.

@xster xster changed the title Add a golden scenario test for fallback font rendering on iOS Add a golden scenario test for fallback font rendering on iOS take 2 Oct 21, 2020
@xster xster requested review from iskakaushik and blasten October 21, 2020 17:04
@xster
Copy link
Member Author

xster commented Oct 21, 2020

I think the previous pre-submit failures were due to our LUCI bots re-running the golden generation on iOS 13 whereas I made it on iOS 14. Might have to download an Xcode 11 copy again.

Comment on lines 60 to 61
XCTAttachment* screenshotAttachment;
screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: these two can be in a single line

if (![_goldenImage compareGoldenToImage:screenshot.image]) {
XCTAttachment* screenshotAttachment;
screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image];
screenshotAttachment.name = _goldenImage.goldenName;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe format this as make it _goldenImage.goldenName + "_current"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

called it "actual" to match testing terminology

XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot];
if (!_goldenImage.image) {
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot];
attachment.name = @"new_golden";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar: maybe format this as make it _goldenImage.goldenName + "_new"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, good idea

BlueprintName = "Scenarios"
ReferencedContainer = "container:Scenarios.xcodeproj">
</BuildableReference>
</MacroExpansion>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I stopped using a build var in the argument scheme somewhere. This whole thing is just for facilitating local test runs inside Xcode for debug and doesn't affect anything.

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM + nits

Copy link
Member Author

@xster xster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea how but I weaksauced the last PR which wasn't passing because the golden screenshot I saved was in the wrong dpi.

XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot];
if (!_goldenImage.image) {
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot];
attachment.name = @"new_golden";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, good idea

if (![_goldenImage compareGoldenToImage:screenshot.image]) {
XCTAttachment* screenshotAttachment;
screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image];
screenshotAttachment.name = _goldenImage.goldenName;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

called it "actual" to match testing terminology

@xster xster added waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. and removed waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. labels Oct 21, 2020
@xster
Copy link
Member Author

xster commented Oct 21, 2020

oops, forgot the tree is closed

@xster
Copy link
Member Author

xster commented Oct 22, 2020

Tests are crapping out probably due to some transient nnbd issue. Rebasing

@xster xster force-pushed the font-fallback-golden branch from 2080e89 to dd9c63b Compare October 22, 2020 18:03
@xster xster added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Oct 22, 2020
@chinmaygarde
Copy link
Member

There are conflicts to the auto-merge bot won't land this. @xster can you please rebase? The tree is open now.

@xster xster force-pushed the font-fallback-golden branch from dd9c63b to f18ef54 Compare October 22, 2020 22:27
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 23, 2020
zanderso pushed a commit to flutter/flutter that referenced this pull request Oct 23, 2020
* 000bf4b Roll Skia from 2d2f82c00aeb to 5c7bb326a7b3 (33 revisions) (flutter/engine#22059)

* ae92dbf Roll Fuchsia Linux SDK from lPMs_KwnU... to gqS_DIjN4... (flutter/engine#22057)

* 92cd74e Roll Fuchsia Mac SDK from pZ9FgVZTK... to WLxBkBnZa... (flutter/engine#22055)

* e51c710 Roll Dart SDK from a3d902d8598e to 9f907e198970 (2 revisions) (flutter/engine#22058)

* 326b202 Reland fuchsia external view embedder will be shared with platform view (flutter/engine#22008)

* a9a9a2f Roll Skia from 5c7bb326a7b3 to 65674e4c2e56 (3 revisions) (flutter/engine#22060)

* 1233fe4 Revert "Revert "Explicitly make the X connection for EGL. (#21831)" (#21851)" (flutter/engine#21871)

* aed8e01 Fixes Edge trigger route change announcement (flutter/engine#21975)

* 6bc70e4 Reland: Migration to PlatformDispatcher and multi-window (flutter/engine#21932)

* 5ca5e26 Add FlEventChannel (flutter/engine#21316)

* 77b0052 Roll Skia from 65674e4c2e56 to 01b05e5b830b (3 revisions) (flutter/engine#22062)

* 3d27fd5 Support loading assets from Android dynamic feature modules (flutter/engine#21504)

* 742dfbe support uri intent launcher in android (flutter/engine#21275)

* cde1e3f Auto detect mode to determine which rendering backend to use. (flutter/engine#21852)

* 329ccf7 Roll Skia from 01b05e5b830b to 53281c712159 (1 revision) (flutter/engine#22065)

* cde78c1 Add a golden scenario test for fallback font rendering on iOS take 2 (flutter/engine#22033)

* 4f4599b Roll Dart SDK from 9f907e198970 to 37ccceacad41 (3 revisions) (flutter/engine#22069)

* f0b10c5 [web] Prevent using DOM nodes for canvas with large number of draws (flutter/engine#22064)

* a86ba57 Roll Fuchsia Mac SDK from WLxBkBnZa... to zDfaxkqlv... (flutter/engine#22073)

* 645198a Roll Fuchsia Linux SDK from gqS_DIjN4... to vuKxZmSVj... (flutter/engine#22074)

* 0b26570 Revert dart rolls (flutter/engine#22078)
dnfield added a commit that referenced this pull request Oct 24, 2020
dnfield added a commit that referenced this pull request Oct 24, 2020
chaselatta pushed a commit to chaselatta/engine that referenced this pull request Nov 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants