Closed Bug 1858696 Opened 2 years ago Closed 2 years ago

Create a marionette test to verify that the expected strings exists in regular browsing mode for both IndexedDB and CacheAPI

Categories

(Core :: Storage: Quota Manager, task, P3)

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: hsingh, Assigned: hsingh)

Details

Attachments

(1 file, 2 obsolete files)

As part of delivering Private Browsing mode for IndexedDB and CacheAPI, we create marionette tests to ensure that on-disk storage is getting encrypted. With marionette, we could analyze filesystem directly to check the sqlite db files, response (cacheAPI) and blob files (IndexedDB) do not contain the original stored strings as they should have been encrypted away.

For IndexedDB, we make sure that original value from key/value pair doesn't occur in the blob file because we assume that values are stored raw in regular mode for indexedDB. We tested this manually but it's better to assert this assumption in test logic as this could change in the future and in that case, our test might not be able to detect encryption regression in that case.

For CacheAPI, we rely on the assumption that response bodies contains magic string 'sNaPpY' as all response bodies gets compressed. So, for PBM testing we ensure that we don't match with 'sNaPpY' in response bodies as they should have been encrypted away. So, similar to IDB, we want to test this assumption.

So, basically we would like to test on-disk contents of IndexedDB and CacheAPI, both sqlite db and their external files (blobs and response bodies respectively)

It doesn't have to be a new test, the existing test for private browsing can be used for that or there would be a common file with common helper functions and then two separate tests for regular and private browsing.

Blocks: 1714354
Status: NEW → ASSIGNED
No longer blocks: 1714354
Attachment #9361199 - Attachment description: Bug 1858696: Created cacheAPI marionette test to verify contents on disk.r=#dom-storage-reviewers → Bug 1858696: Created IDB and CacheAPI marionette tests to verify raw magic strings in on-disk storages.r=janv
Attachment #9368513 - Attachment is obsolete: true
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63c657fc3aed Created IDB and CacheAPI marionette tests to verify raw magic strings in on-disk storages.r=dom-storage-reviewers,webdriver-reviewers,whimboo,janv
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Attachment #9361691 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: