I did a little bit of investigation, and it seems that all the failing tests (at least the ones that are failing for me locally) are failing with unexpected QuotaExceededErrors... Is this the tests not cleaning up properly, or us doing something wrong with quota?
My theory is that this is because testharness.js doesn't have any way to do async cleanup tasks. So while these indexeddb tests mostly try to call window.indexedDB.deleteDatabase on their databases, that is done from a completion_callback and there is nothing making sure the test runner actually waits for those tasks to finish.
So a couple of options:
1) teach testharness.js about async cleanup (something like https://github.com/w3c/web-platform-tests/issues/6075) and update the IDB tests to use that
2) Implement something like the storage clearing proposed in https://lists.w3.org/Archives/Public/public-test-infra/2017JanMar/0039.html and use that to mark all IDB tests as requiring storage cleared (although that discussion seems to have been about clearing storage before running a test, rather than after).
3) Add something to our testharnessreport.js to wait for cleaning up of IDB to complete. Not quite sure what that would look like though.
4) Something else?
Not sure what the easiest/most feasible thing to do is with our test running infrastructure.
Actually this rabit hole goes way deeper. Of course it is an issue that tests can't clear up after themselves properly, but this is made worse because our test runner has a bug in its quota management:
LayoutTestContentBrowserClient::GetQuotaSettings (tries to) return a 1GB quota for all layout tests. That works fine for the first test you run, but then after that first test TestRunner::Reset comes by and overwrites the previously 1GB quota with a 5MB quota instead (trying to "reset the quota to the default"). And that much lower 5MB quota then means that tests are running out of quota much quicker than they normally would.
The functionality in TestRunner to overwrite the quota at all (which annoyingly is documented as just effecting websql quota, but actually effects all quota) is only used in one test, and that one test doesn't even seem to care about the quota it has. So probably completely ripping out the testRunner.setDatabaseQuota functionality would be by far the easiest work-around here.
Comment 1 by jsb...@chromium.org
, Jun 22 2017Components: Blink>Storage>IndexedDB
Owner: dmu...@chromium.org
Status: Assigned (was: Unconfirmed)