Repository navigation
Autofill testdriver - #64855
Autofill testdriver#64855yoavweiss wants to merge 5 commits into
Conversation
sadym-chromium
left a comment
There was a problem hiding this comment.
First AI review pass results. Please be critical to them
| // 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)); |
There was a problem hiding this comment.
[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>).| * @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`. |
There was a problem hiding this comment.
[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:
| * @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 PR adds the autofill module (under bidi) to test driver, enabling tests to call
test_driver.bidi.autofill.trigger.