Граф коммитов

242 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga d6946c7d87 Bug 1917479 - FS: Add handling for invalidated directory locks; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219864
2024-09-18 04:34:19 +00:00
Jan Varga dfa7f0ec23 Bug 1917479 - Add a test for origin clearing requested right after starting client directory opening for FS; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219863
2024-09-18 04:34:19 +00:00
Jan Varga a4d2693441 Bug 1917169 - FS: Add a test for failing openDirectory operations; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D221400
2024-09-12 07:52:50 +00:00
Jan Varga da9fd78405 Bug 1866217 - Replace some nsIQuotaManagerService::GetUsageForPrincipal calls with nsIQuotaManagerService::GetCachedUsageForPrincipal; r=dom-storage-reviewers,jari
There's now a dedicated nsIQuotaManagerService::GetCachedUsageForPrincipal
method for getting cached origin usage. All callers of
nsIQuotaManagerService::GetUsageForPrincipal which want to get cached origin
usage for given principal can be now converted to call the new method.

Differential Revision: https://phabricator.services.mozilla.com/D195363
2024-08-12 16:36:39 +00:00
Jan Varga d42b218203 Bug 1912414 - Remove TestFileSystemQuotaClient.cpp; r=dom-storage-reviewers,aiunusov,jari
The TestFileSystemQuotaClient test suite has been replacted with
TestFileSystemUsageTracking and TestFileSystemOriginInitialization test suites.

Differential Revision: https://phabricator.services.mozilla.com/D194540
2024-08-11 21:40:19 +00:00
Jan Varga 26fd2e5c1c Bug 1912414 - Create a dedicated test for origin initialization; r=dom-storage-reviewers,jari
The new test suite is intended for integration tests which verify origin
initialization. The suite is partially based on the existing
TestFileSystemQuotaClient suite.

TestFileSystemQuotaClient.cpp will get removed in a separate patch.

Differential Revision: https://phabricator.services.mozilla.com/D166175
2024-08-11 10:18:51 +00:00
Jan Varga 8556083bde Bug 1912414 - Add more helpers to FileSystemParentTest; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D194536
2024-08-11 10:18:50 +00:00
Jan Varga 22f0533bf0 Bug 1912414 - Add GetTestClientMetadata function; r=hsingh
Differential Revision: https://phabricator.services.mozilla.com/D194533
2024-08-11 10:18:50 +00:00
Jan Varga b760d057cc Bug 1912414 - Move parent test fixture to separate files; r=aiunusov
Differential Revision: https://phabricator.services.mozilla.com/D194502
2024-08-11 10:18:49 +00:00
Jan Varga b4ec904bdf Bug 1912414 - Final cleanup of TestFileSystemUsageTracking.cpp; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D194487
2024-08-10 22:29:07 +00:00
Jan Varga 1627627fc9 Bug 1912414 - Execute test operations on the right thread; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D194485
2024-08-10 22:29:07 +00:00
Jan Varga ba2be433e4 Bug 1912414 - Replace FileSystemQuotaClient::InitOrigin calls with FileSystemDatabaseManager::GetUsage calls; r=dom-storage-reviewers,jari
FileSystemQuotaClient::InitOrigin shouldn't be called when temporary storage is
already initialized. It shouldn't be called when there's already active storage
connection for the OPFS database either.

Differential Revision: https://phabricator.services.mozilla.com/D194467
2024-08-10 22:29:06 +00:00
Jan Varga ac3eed88db Bug 1912414 - Init quota manager fixture only once during TestFileSystemUsageTracking test suite; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D194466
2024-08-10 22:29:06 +00:00
Jan Varga 1bffefad98 Bug 1912414 - Introduce TestFileSystemUsageTracking.cpp; r=dom-storage-reviewers,jari
The new test suite is intended for integration tests which verify usage
tracking without any restart in between. The suite is based on the existing
TestFileSystemQuotaClient suite except the test which in theory request a
restart in between: TrackedFilesOnInitOriginShouldCauseRescan.

TestFileSystemQuotaClient.cpp will get removed after some additional
refactoring.

Differential Revision: https://phabricator.services.mozilla.com/D194465
2024-08-10 06:56:49 +00:00
Jan Varga 2b727707d5 Bug 1912414 - Move parent test helpers to separate files; r=dom-storage-reviewers,jari
Some helper methods have been also generalized to work with any origin.

Differential Revision: https://phabricator.services.mozilla.com/D194463
2024-08-10 06:56:49 +00:00
Jan Varga 8b7311fa3f Bug 1912414 - Clean up include declarations in TestFileSystemQuotaClient.cpp; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D194462
2024-08-10 06:56:49 +00:00
Jan Varga 90601c9329 Bug 1912414 - Add TEST_TRY macro; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D194365
2024-08-10 06:56:48 +00:00
Jari Jalkanen 2e530eeede Bug 1874334 - Update cached quota usage when OPFS temporary file is copied. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D204780
2024-03-27 12:47:15 +00:00
Jan Varga 1a79df5a9b Bug 1874334 - Add worker related fuzzing finding to OPFS crashtest suite; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D205574
2024-03-27 12:47:15 +00:00
Jari Jalkanen fe3b09f3b6 Bug 1874334 - Add fuzzing finding to OPFS crashtest suite. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D204779
2024-03-27 12:47:14 +00:00
Joel Maher 28be3ac6b4 Bug 1859890 - batch 14 convert xpcshell.ini -> .toml. r=aryx,dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D194162
2023-11-28 01:02:01 +00:00
Jan Varga 6911827cdd Bug 1858820 - Handle other FileSystemWritableFileStream states in FileSystemWritableFileStream::Write; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D190912
2023-10-19 11:25:30 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Jan Varga 7a7f6bd63c Bug 1808294 - Create a dedicated factory for FileSystemQuotaClient; r=dom-storage-reviewers,jari
The new class supports setting a custom factory, so tests can use it for
overriding the quota client implementation.

Differential Revision: https://phabricator.services.mozilla.com/D165851
2023-10-14 05:12:05 +00:00
Jari Jalkanen 6955346ac7 Bug 1844619 - Update assert to account for OPFS temporary files. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D188461
2023-10-04 08:22:04 +00:00
Tom Marble 1ca03b1818 Bug 1855295 convert .ini manifests to .toml: batch 8 dom/[a-l]**/mochitest.ini r=jmaher,jgilbert,extension-reviewers,credential-management-reviewers,robwu,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D189381
2023-10-02 17:18:28 +00:00
Jan Varga ed1fb04885 Bug 1841702 - Add proper handling for failed worker refs; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D188431
2023-09-21 17:37:14 +00:00
Kagami Sascha Rosylight 2cc2490039 Bug 1842007 - Part 2: Replace DomPromiseListener use with Promise method in DoubleBufferQueueImpl r=dom-storage-reviewers,janv,asuth
AddCallbacksWithCycleCollectedArgs prevents potential cycle. (I'm assuming `this` and `newPage` cannot make cycle here)

Also making FileSystemDirectoryIterator::Impl as refcountable to safely capture `this`.

Differential Revision: https://phabricator.services.mozilla.com/D182940
2023-09-19 09:58:00 +00:00
Jan Varga 67e68506f7 Bug 1841702 - Add a new test; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D187429
2023-09-15 19:52:13 +00:00
Jan Varga 7dc772ca50 Bug 1749504 - Remove redundant storage initialization from TestFileSystemQuotaClient tests; r=dom-storage-reviewers,jstutte
TestFileSystemQuotaClient tests currently call InitializeStorage before calling
CreateRegisteredDataManager. However, CreateRegisteredDataManager calls
FileSystemDataManager::GetOrCreateFileSystemDataManager which ensures storage
is initialized, so the prior InitializeStorage call can be removed.

Changes done in this patch:
- removed all calls to InitializeStorage
- removed InitializeStorage method

Differential Revision: https://phabricator.services.mozilla.com/D186113
2023-09-14 04:04:28 +00:00
Jan Varga 13ff443644 Bug 1749504 - Rename EnsureStorageIsInitialized to EnsureStorageIsInitializedInternal; r=dom-storage-reviewers,jstutte
One of the goals of bug 1749504 is to call EnsureStorageIsInitialized only from
InitOp. Calling from other places including quota clients will be disallowed
by changing the method to a private method. The private nature of the method
should be emphasized by adding the Internal suffix.

Changes done in this patch:
- IsStorageInitialized renamed to IsStorageInitializedInternal
- AssertStorageIsInitialized renamed to AssertStorageIsInitializedInternal
- EnsureStorageIsInitialized renamed to EnsureStorageIsInitializedInternal

Differential Revision: https://phabricator.services.mozilla.com/D185547
2023-09-12 12:40:41 +00:00
Cosmin Sabou fd720824bb Bug 1841281 - Disable test_basics.html on mac debug and windows for frequent failures. r=aryx CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D187197
2023-08-31 12:15:08 +00:00
Jari Jalkanen acad3ca16d Bug 1840810 - Preserve file content type when new name is unreadable or has no extension. r=dom-storage-reviewers,janv
Depends on D185428

Differential Revision: https://phabricator.services.mozilla.com/D185429
2023-08-21 15:51:06 +00:00
Jari Jalkanen 8de05e65ed Bug 1840810 - Preserve old content type of OPFS files when new type cannot be determined. r=dom-storage-reviewers,janv
Depends on D184966

Differential Revision: https://phabricator.services.mozilla.com/D184967
2023-08-21 15:51:05 +00:00
Jari Jalkanen 18a7cb30e5 Bug 1845304 - Preserve file content types when OPFS directory moves. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D184966
2023-08-21 15:51:05 +00:00
Jari Jalkanen 69886c6111 Bug 1848916 - Ensure EntryId corresponds to path for OPFS schema 002. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D186344
2023-08-16 19:17:15 +00:00
Jan Varga 98f80b8ab3 Bug 1847989 - Clear only invalid file ids and invalid main files during the additional upgrade for version 2; r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D186172
2023-08-14 21:17:33 +00:00
Cristina Horotan 1665e6df48 Bug 1841281 - disable test_basics.html on win and linux debug for causing frequent failures a=test-only 2023-07-28 15:26:16 +03:00
Mark Banner 602952a200 Bug 1778112 - Move dom/quota/test to use mjs files, rather than defining sourceType for ESLint. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D183371
2023-07-13 13:56:12 +00:00
Jari Jalkanen 25151a9838 Bug 1841012 - Avoid dependencies between tests in test_basics.js for OPFS. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D182490
2023-06-30 08:25:47 +00:00
Jari Jalkanen 047e48ba44 Bug 1824305 - Have tests for open WritableFileStream bugs. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D177282
2023-06-28 16:23:56 +00:00
Jari Jalkanen 67c1ffe2f0 Bug 1824305 - Enable keepExistingData for WritableFileStreams. r=dom-storage-reviewers,janv
In addition, the exclusive WritableFileStream support is restored and disabled.

Differential Revision: https://phabricator.services.mozilla.com/D177277
2023-06-28 16:23:56 +00:00
Jari Jalkanen 1d9d9c4e8b Bug 1824305 - Allow GetFile to return named copies of a file. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D179571
2023-06-28 16:23:55 +00:00
Jari Jalkanen 5bec78fd48 Bug 1824305 - Handle locking of temporary and main files. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D179570
2023-06-28 16:23:55 +00:00
Jari Jalkanen 17863d6a50 Bug 1824305 - Stop failing test if previous test has not created a file. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D179561
2023-06-28 16:23:54 +00:00
Jari Jalkanen ab518cfea6 Bug 1825018 - Handle abort before WritableStream becomes errored. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D177474
2023-06-26 14:19:35 +00:00
Jari Jalkanen 216d5131c8 Bug 1818718 - GTest FileSystemDatabaseManagerVersion002. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D179920
2023-06-16 18:18:38 +00:00
Jari Jalkanen 10a90c6de9 Bug 1818718 - Parameterize TestFileSystemDataManagerVersions on database version. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D179919
2023-06-16 18:18:38 +00:00