Visitar URL original
Autofill testdriver by yoavweiss · Pull Request #64855 · web-platform-tests/wpt · GitHub
Skip to content

Autofill testdriver - #64855

Open
yoavweiss wants to merge 5 commits into
masterfrom
autofill-testdriver
Open

yoavweiss wants to merge 5 commits into
masterfrom
autofill-testdriver

Conversation

@yoavweiss

Copy link
Copy Markdown
Contributor

This PR adds the autofill module (under bidi) to test driver, enabling tests to call test_driver.bidi.autofill.trigger.

@yoavweiss
yoavweiss marked this pull request as ready for review November 6, 2026 13:11

@sadym-chromium sadym-chromium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

First AI review pass results. Please be critical to them

Comment on lines +32 to +34
// Wait for the page, including the iframe, to load before triggering
// autofill, so that the forms are known to the user agent.
const loaded = new Promise(resolve => window.addEventListener("load", resolve));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[AI] On the previous commit (7ad6d28, form created inside a dynamically inserted iframe), wpt-chrome-dev-stability reported autofill a credit card in a same-origin iframe as FAIL 9/10 on Chrome Dev 159.0.8130.0: autofill.trigger resolved with {}, but the iframe fields stayed empty. The static markup avoids this, but a command that succeeds without filling anything looks like a Chromium bug rather than a test requirement. Please file a crbug and reference it here, so that the workaround is tracked, e.g.:

  // Wait for the page, including the iframe, to load before triggering
  // autofill. Chrome may not fill a form in a dynamically inserted iframe
  // (crbug.com/<id>).

Comment thread resources/testdriver.js
Comment on lines +115 to +120
* @param {object} [params.card] - The credit card data to
* fill. Matches the `autofill.Card` type. Mutually
* exclusive with `address`.
* @param {object} [params.address] - The address data to
* fill. Matches the `autofill.Address` type. Mutually
* exclusive with `card`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[AI] nit: Both params are marked optional, but autofill.trigger returns invalid argument when both or neither are given. Consider saying that exactly one is required:

Suggested change
* @param {object} [params.card] - The credit card data to
* fill. Matches the `autofill.Card` type. Mutually
* exclusive with `address`.
* @param {object} [params.address] - The address data to
* fill. Matches the `autofill.Address` type. Mutually
* exclusive with `card`.
* @param {object} [params.card] - The credit card data to
* fill. Matches the `autofill.Card` type. Exactly one of
* `card` and `address` must be provided.
* @param {object} [params.address] - The address data to
* fill. Matches the `autofill.Address` type. Exactly one of
* `card` and `address` must be provided.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants