Commit Graph

177 Commits

Author SHA1 Message Date
kpatenio
c08f380406 Bug 1896772 - add tests for the password rules component r=backup-reviewers,sthompson
The patch adds tests for D216762 and D216762.

Tests verify the following:
- Events dispatched by the password-validation-inputs component
- Password validation
- turn-on-scheduled-backups and enable-backup-encryption interactivity modified inputs

Additional changes:
- adding a head.js file for chrome tests
- moving some helper functions used by browser and  chrome tests to their respective head.js files

Differential Revision: https://phabricator.services.mozilla.com/D216892
2024-07-25 22:23:35 +00:00
kpatenio
a17737f6f6 Bug 1896772 - embed password fields as a separate component into the turn-on-scheduled-backups dialog r=backup-reviewers,sthompson
The patch adds `password-validation-inputs` into `turn-on-scheduled-backups`, therefore removing the need for duplicate password fields and validation logic in the latter component. The turn-on dialog is notified via a dispatched event whenever a valid and invalid password pair is entered.

Tests are written in D216892

Depends on D216617

Differential Revision: https://phabricator.services.mozilla.com/D216762
2024-07-25 22:23:35 +00:00
kpatenio
b5fb94df79 Bug 1896772 - verify and display password rules r=backup-reviewers,fluent-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D216617
2024-07-25 22:23:34 +00:00
Norisz Fay
47349b3029 Backed out changeset 898c9afa27d2 (bug 1905157) for causing build bustages CLOSED TREE 2024-07-23 19:28:00 +03:00
Stephen Thompson
89c71a4a58 Bug 1905157 - Display profile recovery error messages in UI r=backup-reviewers,fluent-reviewers,mconley,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D216090
2024-07-23 15:54:15 +00:00
Stephen Thompson
98746465d5 Bug 1907625 - Measure final backup archive size r=backup-reviewers,mconley
Measure final backup archive size to nearest mebibyte in order to understand how much disk space we are using on users' computers in order to back up their data

Differential Revision: https://phabricator.services.mozilla.com/D216708
2024-07-22 16:00:16 +00:00
Mike Conley
65f281083c Bug 1906912 - Make parseArchiveHeader resilient to partial Unicode characters in the buffer. r=mconley,backup-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D216849
2024-07-18 15:59:46 +00:00
Fred Chasen
96c11a71e5 Bug 1905154: Restore dialog should remain open while a backup recovery is in progress. r=backup-reviewers,fluent-reviewers,flod,sthompson
- Adds a #recoveryInProgress member to BackupService to limit to one recovery at a time
- Adds recoveryInProgress and recoveryErrorCode properties to the BackupSettings component
- Has BackupUIChild set recoveryInProgress / recoveryErrorCode while a recovery is underway.
- Keeps the restore dialog open while the recovery is underway, disables the confirm button and updates it's text to "Restoring..."
- Has BackupUIChild close the recovery dialog if recovery is successful.

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=rmWErO2I6lpY3Vz7-0

Differential Revision: https://phabricator.services.mozilla.com/D215677
2024-07-15 16:29:48 +00:00
Stanca Serban
d4e8f2284a Backed out changeset d98136b45ed4 (bug 1905154) for causing mozilla::dom::PathUtils::InitFileWithPath related mochitests failures. CLOSED TREE 2024-07-13 02:15:07 +03:00
Fred Chasen
f740c2596e Bug 1905154: Restore dialog should remain open while a backup recovery is in progress. r=backup-reviewers,fluent-reviewers,flod,sthompson
- Adds a #recoveryInProgress member to BackupService to limit to one recovery at a time
- Adds recoveryInProgress and recoveryErrorCode properties to the BackupSettings component
- Has BackupUIChild set recoveryInProgress / recoveryErrorCode while a recovery is underway.
- Keeps the restore dialog open while the recovery is underway, disables the confirm button and updates it's text to "Restoring..."
- Has BackupUIChild close the recovery dialog if recovery is successful.

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=rmWErO2I6lpY3Vz7-0

Differential Revision: https://phabricator.services.mozilla.com/D215677
2024-07-12 20:36:27 +00:00
Mike Conley
0bb93129cd Bug 1902336 - Make sure to properly re-encrypt payment methods with the local OSKeyStore after backup recovery. r=backup-reviewers,sthompson
This also adds a fake nsIOSKeyStore implementation for our xpcshell tests. This
should allow us to run these tests on apple_silicon in automation.

Differential Revision: https://phabricator.services.mozilla.com/D215707
2024-07-12 17:48:04 +00:00
Mike Conley
e8c451373e Bug 1906739 - Implement scheduled backups CTA and restore your data sections in backup-settings. r=backup-reviewers,fluent-reviewers,kpatenio,flod
Differential Revision: https://phabricator.services.mozilla.com/D215972
2024-07-11 18:21:03 +00:00
Stephen Thompson
323750a60a Bug 1891146 - Measure places, favicons, and total profile backup time r=places-reviewers,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214983
2024-07-11 16:48:15 +00:00
Mike Conley
fb791f4457 Bug 1907136 - Don't forget to clear the last backup filename / timestamp preference caches when deleting the last backup. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D216201
2024-07-11 14:11:47 +00:00
kpatenio
8573fee2e6 Bug 1904973 - Encryption checkbox in settings page should be hidden when scheduled backups are disabled. r=backup-reviewers,mconley
Summary of updates:
- the "sensitive data" checkbox to toggle backup encryption is no longer displayed when a user turns off scheduled backups
- the "Change password" button, which only appears for encrypted backups, is now aligned with the checkbox + description to match the Figma spec
- once scheduled backups are turned off,  the latest backup file is deleted via the `BackupService.deleteLastBackup()` method

Tests
- moved browser tests related to the turn-off scheduled backups dialog from `backup_settings.js` to their own file `browser_settings_turn_off_scheduled_backups.js`
- updated some browser tasks testing add/change password to have scheduled backups enabled by default
- added a chrome test for the sensitive data checkbox's visibility whenever scheduled backups are toggled on or off

Depends on https://phabricator.services.mozilla.com/D215543

Differential Revision: https://phabricator.services.mozilla.com/D215826
2024-07-10 22:16:45 +00:00
Norisz Fay
3ef4a25161 Backed out changeset da52483d6274 (bug 1891146) for causing xpcshell failures on test_BackupService.js CLOSED TREE 2024-07-11 00:54:17 +03:00
Stephen Thompson
5afc105b07 Bug 1891146 - Measure places, favicons, and total profile backup time r=places-reviewers,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214983
2024-07-10 20:25:10 +00:00
Stephen Thompson
493a609401 Bug 1906714 - Allow profile backup test cleanup to fail r=backup-reviewers,mconley
Clean up of temp test files fails on Windows 10 only

Differential Revision: https://phabricator.services.mozilla.com/D216199
2024-07-10 19:25:49 +00:00
Mike Conley
a44f7c8ceb Bug 1904925 - Fill out more of the backup-settings reusable component. r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,flod,kpatenio
This exposes some UI to show the most recent backup timestamp
and location (if a recent backup exists), and buttons to show
that location, and to edit the location.

Differential Revision: https://phabricator.services.mozilla.com/D215543
2024-07-10 15:38:46 +00:00
Mike Conley
a3b982afa5 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-08 19:18:58 +00:00
Stephen Thompson
ad5c1d8ebf Bug 1906169 - Error plumbing for profile backup web worker r=backup-reviewers,mconley
Some of the Firefox profile backup code is executed within a web worker, so errors thrown in the worker do not automatically maintain their full context when caught in the main process.

This change creates a BackupError for throwing errors with causes specific to Firefox profile backup. The new error type is configured to work with the PromiseWorker machinery in the Firefox codebase in order to serialize and deserialize error details across the worker boundary.

Differential Revision: https://phabricator.services.mozilla.com/D215920
2024-07-08 17:49:45 +00:00
Stephen Thompson
6e5f4652be Bug 1901758 - Remove intermediate artifacts during backup r=backup-reviewers,mconley
Clean up intermediate artifacts in order to be kind to users' disk space:
- remove staging folder after compressing the staging folder into a new single ZIP file
- remove that single ZIP file after embedding its contents into the backup HTML file

Differential Revision: https://phabricator.services.mozilla.com/D215542
2024-07-08 15:52:28 +00:00
Stanca Serban
8ce85d1221 Backed out changeset f35d254c77a2 (bug 1903117) as requested for causing Bug 1906460. 2024-07-05 20:07:05 +03:00
Mike Conley
e1725482b4 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Depends on D214451

Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-04 19:25:17 +00:00
Mike Conley
23cb6c5aa8 Bug 1903127 - Move the single-file archive into the configured destination folder. r=backup-reviewers,fluent-reviewers,sthompson,flod,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214451
2024-07-04 19:25:16 +00:00
Sandor Molnar
09fd2b89b8 Backed out 2 changesets (bug 1903117, bug 1903127) for causing xpc failures @ test_BackupService_resolveArchiveDestFolderPath.js CLOSED TREE
Backed out changeset 3d272e8ab369 (bug 1903117)
Backed out changeset afbf6e3d4145 (bug 1903127)
2024-07-04 21:16:44 +03:00
Mike Conley
7bfd959b85 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-04 17:30:41 +00:00
Mike Conley
5bd3c3fb5f Bug 1903127 - Move the single-file archive into the configured destination folder. r=backup-reviewers,fluent-reviewers,sthompson,flod,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214451
2024-07-04 17:30:41 +00:00
Stephen Thompson
0bdfadda55 Bug 1904949 - Add cause error codes to backup service r=backup-reviewers,mconley
This introduces error code causes that can be used by UI components to present context-relevant error text. This starts throwing errors with cause error codes in parts of the backup codebase, but there are still areas (especially at the boundary with web workers) where cause codes need to be introduced and handled.

Differential Revision: https://phabricator.services.mozilla.com/D215535
2024-07-04 14:03:21 +00:00
Fred Chasen
4080afa4ce Bug 1904146 - Add getBackupFileInfo method to BackupService to handle GetBackupFileInfo events. r=mconley
This implements getting the information needed to show the date of a backup in the restore component and showing the password input if that backup is encrypted.

- Adds a `getBackupFileInfo` method to `BackupService` that will call `sampleArchive` for a passed backup file and update the `backupFileInfo` in the state with a subset of that info.
- Update the `GetBackupFileInfo` event handler in `BackupUIParent` to use the new `getBackupFileInfo` method.

Differential Revision: https://phabricator.services.mozilla.com/D214899
2024-07-03 19:53:34 +00:00
kpatenio
03e6462f3a Bug 1905402 - move enable_backup_encryption tests to a separate file. r=backup-reviewers,sthompson,mconley
Differential Revision: https://phabricator.services.mozilla.com/D215531
2024-07-02 20:25:48 +00:00
Stephen Thompson
0446b8e60f Bug 1892968 - Speed up SQLite backup operations r=backup-reviewers,mconley
50 pages per step and 50 milliseconds of waiting between pages seems to be able to copy sqlite databases in a reasonable amount of time while not causing noticeable performance issues on low-spec test hardware.

Differential Revision: https://phabricator.services.mozilla.com/D215428
2024-07-02 19:21:58 +00:00
Cristian Tuns
63f5f0e2d1 Backed out changeset 5c817eb3498b (bug 1891146) for causing xpcshell failures in test_BackupService.js (Bug 1905413) CLOSED TREE 2024-06-28 16:10:51 -04:00
Stephen Thompson
d3f943915d Bug 1891146 - Measure places, favicons, and total profile backup time r=places-reviewers,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214983
2024-06-28 17:56:39 +00:00
kpatenio
f7ec7bedb7 Bug 1893295 - (part 3) add tests for enable-backup-encryption and simplify mock input events. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214897
2024-06-28 16:55:03 +00:00
kpatenio
c9515e2262 Bug 1893295 - (part 2) make enable-backup-encryption re-run encryption using BackupUI actors and BackupService. r=backup-reviewers,firefox-desktop-core-reviewers ,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214893
2024-06-28 16:55:02 +00:00
kpatenio
6b1fc1b1fd Bug 1893295 - (part 1) build enable-backup-encryption component. r=backup-reviewers,fluent-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214483
2024-06-28 16:55:02 +00:00
Mike Conley
b4a1bad483 Bug 1903064 - Prevent recovery from backups created from an application with a newer appVersion. r=backup-reviewers,sthompson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215004
2024-06-28 15:50:31 +00:00
Mike Conley
b420e6f986 Bug 1903606 - Prevent recovery from backups created from an application with a different appName. r=backup-reviewers,sthompson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215002
2024-06-28 15:50:30 +00:00
Fred Chasen
2a4446e81f Bug 1904147 - Update RestoreFromBackupFile event handler to call recoverFromBackupArchive. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D215153
2024-06-27 23:06:17 +00:00
Stanca Serban
6dd32359fe Backed out changeset edf305a8036e (bug 1904146) for causing mochitests failures in browser_settings_turn_on_scheduled_backups.js. 2024-06-28 02:20:50 +03:00
Fred Chasen
fe16fc1d18 Bug 1904146 - Add getBackupFileInfo method to BackupService to handle GetBackupFileInfo events. r=mconley
This implements getting the information needed to show the date of a backup in the restore component and showing the password input if that backup is encrypted.

- Adds a `getBackupFileInfo` method to `BackupService` that will call `sampleArchive` for a passed backup file and update the `backupFileInfo` in the state with a subset of that info.
- Update the `GetBackupFileInfo` event handler in `BackupUIParent` to use the new `getBackupFileInfo` method.

Differential Revision: https://phabricator.services.mozilla.com/D214899
2024-06-27 19:04:46 +00:00
Mike Conley
d8f42dafcd Bug 1901526 - Build out backup scheduling mechanism. r=backup-reviewers,kpatenio,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D213468
2024-06-27 17:27:27 +00:00
Mike Conley
89eee9ec2c Bug 1904337 - Stop backing up signedInUser.json. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215017
2024-06-27 14:47:13 +00:00
kpatenio
4e846b8936 Bug 1904727 - call loadEncryptionState once BackupService is connected. r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214900
2024-06-26 19:36:42 +00:00
Mike Conley
76adb68dbe Bug 1901541 - Fix test_BackupService_archive test to account for slow file closing on Windows debug builds. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214731
2024-06-26 16:04:21 +00:00
Stephen Thompson
e789eddb3e Bug 1887765 - BackupService total backup size metric r=backup-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214438
2024-06-25 17:35:34 +00:00
Mike Conley
f1aee3dbb7 Bug 1901534 - Compute a new ArchiveEncryptionState for a recovered, encrypted profile. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214392
2024-06-25 00:35:44 +00:00
Mike Conley
6dedf6b415 Bug 1891854 - Do not backup session cookies if backup encryption is not enabled. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D214318
2024-06-25 00:35:44 +00:00
Mike Conley
85ae68fe2e Bug 1901520 - Part 3: Add tests for the rendered template. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D214027
2024-06-25 00:35:43 +00:00