Closed Bug 2071837 Opened 2 months ago Closed 2 months ago

Add test coverage for the addresses.storage.rust.enabled pref

Categories

(Toolkit :: Form Autofill, task, P2)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

Bug 2058441 added the Rust address store, but the address tests only exercise the JSON one.

Run the existing address browser tests, and test_getRecords.js, a second time with extensions.formautofill.addresses.storage.rust.enabled set, so the store is covered before it serves addresses by default. Addresses only: credit cards are not copied into the Rust store.

Two manifests run existing address tests a second time, with the Rust store
serving every address read and write:

  • test/browser/rust/browser.toml includes test/browser/address/ wholesale, so
    those tests and their skip-if annotations are inherited rather than copied.
    The entries it lists are the address tests that live in test/browser/ instead,
    whose manifest also holds credit card, passport and ML tests that must not run
    against this store; each of those is a shim that loads its original.

  • test/unit/xpcshell_rust.toml does the same for test_getRecords.js, and names
    the storage tests that cannot be shared: they reach either for sync APIs the
    Rust adapter does not answer, since its sync goes through a bridged engine, or
    past the collection API into the JSON store.

Both head.js files assert rust.active once the pref is set. The pref only asks:
FormAutofillStorage keeps serving JSON until the migration completes, so a run
could otherwise pass having never touched the Rust store.

browser_address_migration.js moves out of test/browser/rust/, because it covers
the migration rather than re-running a test under a different pref. Its fixture
now carries a multi-line street address and a phone number, so the fields Rust
derives on read from the single column it stores are asserted against a record
the migration copied.

Everything left under test/browser/rust/, and every entry in xpcshell_rust.toml,
is a second run of a test that lives elsewhere, so both can be deleted whole
once the Rust store is the only one.

See Also: → 2071908
Pushed by dlee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/94680093d235 https://hg.mozilla.org/integration/autoland/rev/3116245d24e8 Add test coverage for the addresses.storage.rust.enabled pref r=joschmidt,credential-management-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4bb3cb2c5b49 https://hg.mozilla.org/integration/autoland/rev/d0cb2c35ec74 Revert "Bug 2071837 - Add test coverage for the addresses.storage.rust.enabled pref r=joschmidt,credential-management-reviewers" for causing bc failures @ browser_autofill_address_name.js & browser_address_migration.js
Pushed by dlee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/289247901327 https://hg.mozilla.org/integration/autoland/rev/327610ba2afb Add test coverage for the addresses.storage.rust.enabled pref r=joschmidt,credential-management-reviewers
Status: REOPENED → RESOLVED
Closed: 2 months ago → 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
Flags: needinfo?(dlee)
QA Whiteboard: [qa-triage-done-c159/b158]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: