extension-storage-test-author
extension-storage-test-author
Overview
chrome.storage has four areas with non-overlapping quotas, persistence
semantics, and enterprise-policy posture. Picking the wrong one is a class of
bug the type checker can't catch: storage.sync silently rejects writes past
its total or per-item limit, storage.session evaporates on browser restart,
and storage.managed is read-only by definition and throws on write.
This skill emits the test suite that proves the right area was chosen, the
quota gates fire on the documented thresholds, and the storage.onChanged
payload shape matches across all writing code paths. The output is a Vitest /
Playwright spec the extension ships in its test suite. Quota constants are
stated once in the Step 2 decision matrix; the deeper worked templates, the
version-specific floors, and the Firefox-Chrome divergence table live in
references/storage-test-templates.md.