这是indexloc提供的服务,不要输入任何密码
Skip to content

[web] Make web integration tests shadow DOM aware. #82926

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

Merged
merged 4 commits into from
May 20, 2021
Merged

[web] Make web integration tests shadow DOM aware. #82926

merged 4 commits into from
May 20, 2021

Conversation

ditman
Copy link
Member

@ditman ditman commented May 19, 2021

A new version of the web engine changes the markup of Flutter Web apps to render them inside the ShadowDOM of the flt-glass-pane tag.

This PR changes the flutter framework engine integration tests so they are backwards (and forwards) compatible with both DOM styles.

Issues

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@ditman ditman requested a review from yjbanov May 19, 2021 18:36
@flutter-dashboard flutter-dashboard bot added a: tests "flutter test", flutter_test, or one of our tests d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels May 19, 2021
@google-cla google-cla bot added the cla: yes label May 19, 2021
Copy link
Member Author

@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.

Just a couple of comments which maybe should live in the code somewhere :/


// Press and release CapsLock.
dispatchKeyboardEvent(input, 'keydown', <String, dynamic>{
'key': 'CapsLock',
'code': 'CapsLock',
'bubbles': true,
'cancelable': true,
'composed': true,
Copy link
Member Author

Choose a reason for hiding this comment

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

composed needs to be set to true in synthetic events (similar to bubbles) so the event propagates in a similar way as to when it's dispatched by the browser. Docs.

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@ditman
Copy link
Member Author

ditman commented May 19, 2021

(This needs a rebase, to land after #82939)

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot merged commit c94f0be into flutter:master May 20, 2021
@ditman ditman deleted the flutter-web-shadow-dom branch May 20, 2021 23:28
@ditman ditman restored the flutter-web-shadow-dom branch May 21, 2021 00:29
@ditman ditman deleted the flutter-web-shadow-dom branch May 21, 2021 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests c: contributor-productivity Team-specific productivity, code health, technical debt. d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants