Skip to content

Conversation

@justinmc
Copy link
Contributor

Integration test for: flutter/engine#6989

@justinmc justinmc self-assigned this Nov 29, 2018
@justinmc
Copy link
Contributor Author

@HansMuller This is a work in progress but so far I have:

  1. Created an integration test and a corresponding app.
  2. Created a new command in FlutterDriver called setEditingState.
  3. Received the command in extension.dart.

Is that generally the right track so far? Are my next steps to somehow expose a way to call setEditingState on the text field in extension.dart, or am I off?

@justinmc justinmc force-pushed the japanese-text-clear-test branch from 6837812 to b6f973d Compare November 29, 2018 18:13
@zoechi zoechi added a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Nov 30, 2018
@justinmc justinmc force-pushed the japanese-text-clear-test branch from b6f973d to 4a9324c Compare December 3, 2018 23:04
@justinmc justinmc force-pushed the japanese-text-clear-test branch from 4a9324c to 7dece7d Compare December 4, 2018 16:12
}

/// TODO document and say never use this unless you really need it!
Future<void> setMarkedText(String markedTextValue, { Duration timeout }) async {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added these three methods to driver. setMarkedText might not be necessary, but I was using it to try to reproduce the crash (unsuccessfully) exactly as it happens.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After looking into this with @HansMuller, the engine side of setEditingState seems to be unable to update the engine's native text input to contain marked text.

Future<SetMarkedTextResult> _setMarkedText(Command command) async {
final SetMarkedText setMarkedTextCommand = command;
// TODO pass finder with command rather than using hard coded key
BinaryMessages.testSend(
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 how I was able to send messages to the engine, bypassing mocking. The engine does receive these commands, but the textfield doesn't update in the simulator.

@justinmc
Copy link
Contributor Author

justinmc commented Dec 4, 2018

I'm unable to reproduce the crash because I can't insert marked text into a Cupertino text field. I'm closing this in favor of an issue that addresses this problem: #24955

@justinmc justinmc closed this Dec 4, 2018
@justinmc justinmc deleted the japanese-text-clear-test branch December 4, 2018 23:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 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 a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants