Fix IndexedDB WPT coverage (#37607)

The settings for WPT IndexedDB coverage is incorrect. We never ran the
IndexedDB tests actually.

Testing: `tests/wpt/tests/IndexedDB`

---------

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2025-06-24 12:47:45 +09:00 committed by GitHub
parent 476b05676f
commit 25fe003af2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
230 changed files with 7240 additions and 38 deletions

View file

@ -72,6 +72,8 @@ impl KvsEngine for HeedEngine {
.create_database(&mut write_txn, Some(&*store_name.to_string()))
.expect("Failed to create idb store");
write_txn.commit().expect("Failed to commit transaction");
let key_generator = { if auto_increment { Some(0) } else { None } };
let store = Store {
@ -96,6 +98,8 @@ impl KvsEngine for HeedEngine {
.create_database(&mut write_txn, Some(&*store_name.to_string()))
.expect("Failed to create idb store");
store.clear(&mut write_txn).expect("Could not clear store");
write_txn.commit().expect("Failed to commit transaction");
let mut open_stores = self.open_stores.write().unwrap();
open_stores.retain(|key, _| key != &store_name);
}