Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Instrumentation.waitForIdleSync() after rotation requests. #51169

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

matanlurey
Copy link
Contributor

@@ -99,6 +101,7 @@ public void testPlatformViewRotate() throws Exception {
intent.putExtra("scenario_name", "platform_view_rotate");
PlatformViewsActivity activity = activityRule.launchActivity(intent);
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
instrumentation.waitForIdleSync();
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this be null?

I think what you actually want here is InstrumentationRegistry.getInstrumentation().waitForIdleSync()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

(this one is still missing)

@@ -100,6 +102,7 @@ public void testPlatformViewRotate() throws Exception {
intent.putExtra("scenario_name", "platform_view_rotate");
PlatformViewsActivity activity = activityRule.launchActivity(intent);
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
instrumentation.waitForIdleSync();
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto here - but if you'd rather add a setup method for setting this I guess that's fine too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah oops, thought I had all of them. I would have tried it locally first but uh:
https://discord.com/channels/608014603317936148/608021010377080866/1214272920382210049

@dnfield
Copy link
Contributor

dnfield commented Mar 4, 2024

I think this is worth a try (once it's fixed to actually get an instance for all test cases), but I'm not 100% sure about how well the way Flutter renders will play with it.

@adazh may know more - although I think the way Espresso solved this involved using the a11y tree and/or having callbacks fired from the framework/engine.

@matanlurey matanlurey merged commit 8274a4f into flutter:main Mar 4, 2024
23 checks passed
@matanlurey matanlurey deleted the scenario_app-waitForIdleSync branch March 4, 2024 19:05
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 4, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 4, 2024
…144570)

flutter/engine@0d8588b...4001881

2024-03-04 matej.knopp@gmail.com Reland: [macOS] Use CVDisplayLink to drive repaint (flutter/engine#51126)
2024-03-04 jason-simmons@users.noreply.github.com Support gtest-parallel when running Impeller unit tests (flutter/engine#51079)
2024-03-04 matanlurey@users.noreply.github.com Scenario App: Adds a `run_{count}.{backend}.` file prefix to every run (on CI) (flutter/engine#51102)
2024-03-04 matanlurey@users.noreply.github.com Use Instrumentation.waitForIdleSync() after rotation requests. (flutter/engine#51169)
2024-03-04 skia-flutter-autoroll@skia.org Roll Skia from 9c7d13c05e77 to f65ecbdfb09c (1 revision) (flutter/engine#51170)
2024-03-04 dnfield@google.com Guard against API 22 (flutter/engine#51167)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC aaclarke@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scenario App "rotate" tests seem to have colors that don't settle
2 participants