Skip to content
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

Make autofill detection more robust #1031

Merged
merged 8 commits into from Oct 30, 2019

Conversation

@jhugman
Copy link
Contributor

jhugman commented Oct 26, 2019

Fixes #765.
Fixes #615.

This PR makes detection of autofillable pages significantly better.

  • Detects text input by inputType, instead of class name.
  • Distinguish between username and password fields even without any autofillHints from the app.
  • Don't rely on localized hints.
  • Recognizes adjacent username and password fields.
  • Recognizes the form that the user is focused on, in supporting webviews.

Apps Tested:

  • Facebook
  • Facebook Lite
  • Messenger
  • Messenger Lite
  • Twitter
  • Twitter Lite
  • Firefox Accounts (for Pocket)
  • Apple ID (for Pocket)
  • Amazon
  • Fortuneo
  • Google Accounts

Tested in Fenix

  • Facebook
  • Twitter
  • Fortuneo
  • Google Accounts

Tested in Fennec

  • Facebook

Still failing:

  • Amazon in Fenix. GeckoView 1591737 is relevant here.
  • Firefox Accounts in Fenix.
  • Saving Wifi passwords in the Settings app.

Also added:

  • More XML files to test new apps
  • Added isFocused and isHtmlForm to navigator.
@jhugman jhugman requested a review from mozilla-lockwise/mobile-engineering as a code owner Oct 26, 2019
@jhugman jhugman force-pushed the jhugman/765-make-autofill-detection-more-robust branch from 86347ed to 9920254 Oct 26, 2019
@jhugman jhugman self-assigned this Oct 26, 2019
@jhugman jhugman force-pushed the jhugman/765-make-autofill-detection-more-robust branch from 4292a0f to 987c96a Oct 29, 2019
Copy link
Contributor

eliserichards left a comment

This is fantastic. Thank you for the thorough testing notes. I added a commit to put the MPL on all of the /debug/assets/ files.

@jhugman jhugman merged commit afbd758 into master Oct 30, 2019
5 checks passed
5 checks passed
Bitrise Summary
Details
WIP Ready for review
Details
codecov/patch 67.8% of diff hit (target 50%)
Details
codecov/project/app No report found to compare against
Details
codecov/project/fxa 0.5% (target 0%)
Details
@jhugman jhugman deleted the jhugman/765-make-autofill-detection-more-robust branch Oct 30, 2019
@jhugman jhugman mentioned this pull request Oct 31, 2019
@eliserichards eliserichards mentioned this pull request Oct 31, 2019
0 of 6 tasks complete
eliserichards added a commit that referenced this pull request Oct 31, 2019
* Make autofill detection more robust

* Look for adjacent text field and password field

* Get from multiple forms

* Add support for looking for in focus forms. Not working due to GeckoView

* Added Apple ID example XML file

* Now auth0 works

* ./gradlew lint

* Add lincense to fixtures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.