Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Oct 7, 2020

Reverts #67561

Fixes insertion of null string into message data which crashed integration with web driver. Adds unit test to cover

Fixes #67560

@flutter-dashboard flutter-dashboard bot added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Oct 7, 2020
@google-cla google-cla bot added the cla: yes label Oct 7, 2020
@goderbauer goderbauer changed the title Revert "Revert "[null-safety] reland: migrate app side flutter driver to null-safety"" Reland "[null-safety] reland: migrate app side flutter driver to null-safety" Oct 8, 2020
@override
Map<String, String> serialize() => super.serialize()..addAll(<String, String>{
'message': message,
if (message != null)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix

Copy link
Member

Choose a reason for hiding this comment

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

Ahhh, OK, I was misunderstanding the ! because I wasn't seeing the != null around it; it's used to remove the ? from the type of the variable. Cool beans!

import '../../common.dart';

void main() {
test('RequestData does not insert "null" string when no message is provided', () {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unit test for this

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Manually tested this on my local repro of #67560, it seems to do the trick!!

Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: tests "flutter test", flutter_test, or one of our tests c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter driver appears to be broken on web

4 participants