Skip to content

Added a Driver wait condition for no pending platform messages#39196

Merged
adazh merged 4 commits intoflutter:masterfrom
adazh:messenger_testing_binding
Aug 27, 2019
Merged

Added a Driver wait condition for no pending platform messages#39196
adazh merged 4 commits intoflutter:masterfrom
adazh:messenger_testing_binding

Conversation

@adazh
Copy link
Copy Markdown
Contributor

@adazh adazh commented Aug 25, 2019

Description

Added a Driver wait condition for no pending platform messages.

Related Issues

#37409

Tests

I added the following tests:

extension_test.dart
flutter_driver_test.dart

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@fluttergithubbot fluttergithubbot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Aug 25, 2019
@adazh adazh requested review from Hixie, goderbauer and tvolkert August 25, 2019 04:14
Comment thread packages/flutter_driver/lib/src/common/wait.dart Outdated
}

@override
BinaryMessenger createBinaryMessenger() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do this here as well? I thought you only need it for driver tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, now we only need it for driver tests.

Initially, it was because this made it much easier for testing this APIs using widget tester. Otherwise, we have to write on-device tests to test this wait condition. Secondly, as Collin/Tong are working on making widget tester work on device, I think this change will actually be beneficial to their work as well. Thus, this change. LMK what you think.

Comment thread packages/flutter/lib/src/services/binding.dart Outdated
@adazh adazh requested a review from goderbauer August 26, 2019 20:46
Copy link
Copy Markdown
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/flutter_test/lib/src/binding.dart
Comment thread packages/flutter_test/lib/src/binding.dart Outdated
@adazh adazh merged commit 5667b78 into flutter:master Aug 27, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants