Web Platform Tests: Storage Pressure

15 views
Skip to first unread message

Jarryd Goodman

unread,
Aug 4, 2020, 4:45:52 PM8/4/20
to ecosyst...@chromium.org, Marijn Kruisselbrink, astav...@google.com
Hello all,

I am interested in writing web platform tests that will test a new storage pressure event. I wanted to know if it was possible to use WebDriver to simulate storage pressure, which is the state in which a device has low free disk space. The event is a DOM event which fires when storage systems identify storage pressure, and the event is dispatched to any script that has registered an event listener, but will not wake ServiceWorkers. I'm hoping to write a test where, at the start, there is no (simulated) storage pressure, I add an event listener, simulate storage pressure, and then listen for any events fired.

Any suggestions on how I could achieve this? Are there any examples of this? Any thoughts or tips would be appreciated.

Thanks!

Google Logo
Jarryd Goodman
Software Engineer
jar...@chromium.org

Robert Ma

unread,
Aug 4, 2020, 4:54:15 PM8/4/20
to Jarryd Goodman, ecosystem-infra, Marijn Kruisselbrink, astav...@google.com
AFAIK, there isn't an existing WebDriver command for this. You might need to define a WebDriver extension first (i.e. monkey-patching the WebDriver spec from your spec), similar to what WebAuthn does.

--
You received this message because you are subscribed to the Google Groups "ecosystem-infra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ecosystem-inf...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/ecosystem-infra/CAEHjowwvSzTcV%2BMhn08%2BUr-r%2BOH9dgWuVTBKcp9AWw-j%3DFt7FA%40mail.gmail.com.

Stephen Mcgruer

unread,
Aug 4, 2020, 5:23:34 PM8/4/20
to Robert Ma, Jarryd Goodman, ecosystem-infra, Marijn Kruisselbrink, astav...@google.com
Note that we also have a mostly up-to-date guide, https://docs.google.com/document/d/18BpD41vyX1cFZ77CE0a_DJYlGpdvyLlx3pwXVRxUzvI/edit#heading=h.3xm97m7radrn, which can help you through the various steps involved. We know it needs updating, so if you can report problems as you find them that would also be great :D

I would also not look to WebAuthn as a model for your use-case, which is far simpler than what WebAuthn wants from webdriver. The reporting spec has a very simple endpoint that just causes the browser to generate a report; you could define a similar endpoint that causes the browser to fire a storage pressure event.

Reply all
Reply to author
Forward
0 new messages