On Fri, Dec 15, 2023 at 9:03 PM Evan Stade <est...@chromium.org> wrote:
> Thanks all! > > On Wed, Dec 13, 2023 at 5:10 AM Philip Jägenstedt <foo...@chromium.org> > wrote: > >> Hi Evan, >> >> Thanks for looking into this, and for answering some of my questions >> off-list. To summarize, eviction is spec'd very loosely and a testdriver.js >> API could probably only be "evict everything" or "evict data in this >> bucket". Neither of those would test the interesting parts of how quota, >> expiry time and probably other signals are used to determine which buckets >> to evict. Bottom line, if we can't see a WebDriver endpoint that would poke >> at the right internals *in all browsers*, then it wouldn't be testing >> production code beyond what is already tested. >> >> It looks like get or expire a bucket >> <https://wicg.github.io/storage-buckets/#get-or-expire-a-bucket> could >> be tested using bucket.setExpires(), but AFAICT this isn't tested. >> > > To write reliable tests for that, we'd need a way to manipulate the clock. > Is there a way to do that from WPT? I can't seem to find it if so. > The clock can't be mocked using WPT, but I assumed from skimming the spec that it would work to just set the expiration time to a time in the past, most trivially `bucket.setExpires(0)`. If that's not the case, then LGTM to ship without any new tests, but I'd like to understand off-thread why it's not the case. -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYf5QmQNG2wn%2Bi9Fyk9Tx9%2BM1gP2COG-2GZu%2BuN81ixiXA%40mail.gmail.com.