mirror of
https://github.com/servo/servo
synced 2026-05-03 12:52:25 +02:00
Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7
This commit is contained in:
@@ -2,27 +2,9 @@
|
||||
<title>IndexedDB: IDBTransaction.objectStoreNames attribute</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support.js"></script>
|
||||
<script>
|
||||
|
||||
function indexeddb_test(upgrade_func, open_func, description) {
|
||||
async_test(function(t) {
|
||||
var dbname = document.location + '-' + t.name;
|
||||
var del = indexedDB.deleteDatabase(dbname);
|
||||
del.onerror = t.unreached_func('deleteDatabase should succeed');
|
||||
var open = indexedDB.open(dbname, 1);
|
||||
open.onerror = t.unreached_func('open should succeed');
|
||||
open.onupgradeneeded = t.step_func(function() {
|
||||
var db = open.result;
|
||||
var tx = open.transaction;
|
||||
upgrade_func(t, db, tx);
|
||||
});
|
||||
open.onsuccess = t.step_func(function() {
|
||||
var db = open.result;
|
||||
open_func(t, db);
|
||||
});
|
||||
}, description);
|
||||
}
|
||||
|
||||
function with_stores_test(store_names, open_func, description) {
|
||||
indexeddb_test(function(t, db, tx) {
|
||||
store_names.forEach(function(name) {
|
||||
|
||||
Reference in New Issue
Block a user