-
Notifications
You must be signed in to change notification settings - Fork 6k
Use Instrumentation.waitForIdleSync() after rotation requests. #51169
Use Instrumentation.waitForIdleSync() after rotation requests. #51169
Conversation
@@ -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(); |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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. |
…144570) flutter/engine@0d8588b...4001881 2024-03-04 [email protected] Reland: [macOS] Use CVDisplayLink to drive repaint (flutter/engine#51126) 2024-03-04 [email protected] Support gtest-parallel when running Impeller unit tests (flutter/engine#51079) 2024-03-04 [email protected] Scenario App: Adds a `run_{count}.{backend}.` file prefix to every run (on CI) (flutter/engine#51102) 2024-03-04 [email protected] Use Instrumentation.waitForIdleSync() after rotation requests. (flutter/engine#51169) 2024-03-04 [email protected] Roll Skia from 9c7d13c05e77 to f65ecbdfb09c (1 revision) (flutter/engine#51170) 2024-03-04 [email protected] 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 [email protected],[email protected],[email protected] 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
Fixes flutter/flutter#144553.
Looking roughly at:
... and given the fact it's only the rotation tests that seem especially flaky, let's give it a shot?
/cc @reidbaker @johnmccutchan if you have other advice.