diff --git a/IndexedDB/idbdatabase_close.htm b/IndexedDB/idbdatabase_close.htm index c73d1f9f20bfe1..09c0e164858f69 100644 --- a/IndexedDB/idbdatabase_close.htm +++ b/IndexedDB/idbdatabase_close.htm @@ -1,46 +1,42 @@ - - - IDBDatabase.close() - unblock the version change transaction created by an open database request - - - - + + - function RunTest() { - var rqOpen = window.indexedDB.open(databaseName, databaseVersion); - rqOpen.onsuccess = t.step_func( function(event) { - db = event.target.result; - var rqOpen2 = window.indexedDB.open(databaseName, databaseVersion + 1); - rqOpen2.onblocked = t.step_func( function (event) { - bBlockEventFired = true; - db.close(); - }); - rqOpen2.onerror = t.step_func( assert_database_error );; - rqOpen2.onsuccess = t.step_func( function (event) { - assert_true(bBlockEventFired && bUpgradeNeededEventFired, "version change transaction is not unblocked when existing database connection is closed") - t.done(); - return; - }); - rqOpen2.onupgradeneeded = t.step_func( function (event) { - bUpgradeNeededEventFired = true; - }); - }); - } + - - -
- - \ No newline at end of file + t.done(); + }); + rq.onerror = fail(t, 'Unexpected database deletion error'); +}; + + + +
diff --git a/IndexedDB/idbdatabase_close2.htm b/IndexedDB/idbdatabase_close2.htm index 52ff2d491b4017..ea34fe658fd474 100644 --- a/IndexedDB/idbdatabase_close2.htm +++ b/IndexedDB/idbdatabase_close2.htm @@ -1,43 +1,32 @@ - - - IDBDatabase.close() - unblock the delete database request - - - - + + - function RunTest() { - var rqOpen = window.indexedDB.open(databaseName, databaseVersion); - rqOpen.onsuccess = t.step_func( function(event) - { - db = event.target.result; - var rqDeleteDB = window.indexedDB.deleteDatabase(databaseName); - rqDeleteDB.onblocked = t.step_func( function (event) { - bBlockEventFired = true; - db.close(); - }); - rqDeleteDB.onerror = t.step_func( assert_deleteDatabase_request_error ); - rqDeleteDB.onsuccess = t.step_func( function (event) { - assert_true(bBlockEventFired, "delete database request not unblocked when existing database connection is closed") - t.done(); - return; - }); - }); - } + - - -
- - \ No newline at end of file +open_rq.onupgradeneeded = function() {} +open_rq.onsuccess = function(e) { + db = e.target.result; + + var rq = window.indexedDB.deleteDatabase(databaseName); + rq.onblocked = t.step_func(function (e) { + blocked_fired = true; + db.close(); + }); + rq.onsuccess = t.step_func(function (e) { + assert_true(blocked_fired, "block event fired") + t.done(); + }); + rq.onerror = fail(t, 'Unexpected database deletion error'); +}; + + + +
diff --git a/IndexedDB/idbfactory_open9.htm b/IndexedDB/idbfactory_open9.htm index c387725e94336b..d9f392cfdc3423 100644 --- a/IndexedDB/idbfactory_open9.htm +++ b/IndexedDB/idbfactory_open9.htm @@ -5,31 +5,56 @@
diff --git a/IndexedDB/manifest.txt b/IndexedDB/manifest.txt deleted file mode 100644 index 653bf1f577de48..00000000000000 --- a/IndexedDB/manifest.txt +++ /dev/null @@ -1,108 +0,0 @@ -idb_webworkers.htm IndexedDB inside of a WebWorker -idbcursor_advance_index.htm IDBCursor.advance() - index - iterate cursor number of times specified by count -idbcursor_advance_objectstore.htm IDBCursor.advance() - object store - iterate cursor number of times specified by count -idbcursor_continue_index.htm IDBCursor.continue() - index - iterate to the next record -idbcursor_continue_index2.htm IDBCursor.continue() - index - attempt to pass a key parameter is not a valid key -idbcursor_continue_index3.htm IDBCursor.continue() - index - attempt to iterate to the previous record when the direction is set for the next record -idbcursor_continue_index4.htm IDBCursor.continue() - index - attempt to iterate to the next record when the direction is set for the previous record -idbcursor_continue_objectstore.htm IDBCursor.continue() - object store - iterate to the next record -idbcursor_continue_objectstore2.htm IDBCursor.continue() - object store - attempt to pass a key parameter is not a valid key -idbcursor_continue_objectstore3.htm IDBCursor.continue() - object store - attempt to iterate to the previous record when the direction is set for the next record -idbcursor_continue_objectstore4.htm IDBCursor.continue() - object store - attempt to iterate to the next record when the direction is set for the previous record -idbcursor_delete_index.htm IDBCursor.delete() - index - remove a record from the object store -idbcursor_delete_index2.htm IDBCursor.delete() - index - attempt to remove a record in a read-only transaction -idbcursor_delete_index3.htm IDBCursor.delete() - index - attempt to remove a record in an inactive transaction -idbcursor_delete_objectstore.htm IDBCursor.delete() - object store - remove a record from the object store -idbcursor_delete_objectstore2.htm IDBCursor.delete() - object store - attempt to remove a record in a read-only transaction -idbcursor_delete_objectstore3.htm IDBCursor.delete() - object store - attempt to remove a record in an inactive transaction -idbcursor_update_index.htm IDBCursor.update() - index - modify a record in the object store -idbcursor_update_index2.htm IDBCursor.update() - index - attempt to modify a record in a read-only transaction -idbcursor_update_index3.htm IDBCursor.update() - index - attempt to modify a record in an inactive transaction -idbcursor_update_objectstore.htm IDBCursor.update() - object store - modify a record in the object store -idbcursor_update_objectstore2.htm IDBCursor.update() - object store - attempt to modify a record in a read-only transaction -idbcursor_update_objectstore3.htm IDBCursor.update() - object store - attempt to modify a record in an inactive transaction -idbdatabase_close.htm IDBDatabase.close() - unblock the version change transaction created by an open database request -idbdatabase_close2.htm IDBDatabase.close() - unblock the delete database request -idbdatabase_createObjectStore.htm IDBDatabase.createObjectStore() - returns an instance of IDBObjectStore -idbdatabase_createObjectStore2.htm IDBDatabase.createObjectStore() - object store 'name' and 'keyPath' properties are correctly set -idbdatabase_createObjectStore3.htm IDBDatabase.createObjectStore() - attempt to create an object store outside of a version change transaction -idbdatabase_createObjectStore4.htm IDBDatabase.createObjectStore() - attempt to create an object store that already exists -idbdatabase_createObjectStore5.htm IDBDatabase.createObjectStore() - object store's name appears in database's list -idbdatabase_createObjectStore6.htm IDBDatabase.createObjectStore() - attempt to create an object store with an invalid key path -idbdatabase_deleteObjectStore.htm IDBDatabase.deleteObjectStore() - object store's name is removed from - database's list -idbdatabase_deleteObjectStore2.htm IDBDatabase.deleteObjectStore() - attempt to remove an object store outside of a version change transaction -idbdatabase_deleteObjectStore3.htm IDBDatabase.deleteObjectStore() - attempt to remove an object store that does not exist -idbdatabase_transaction.htm IDBDatabase.transaction() - attempt to open a transaction with invalid scope -idbdatabase_transaction2.htm IDBDatabase.transaction() - opening a transaction defaults to a read-only mode -idbdatabase_transaction3.htm IDBDatabase.transaction() - attempt to open a transaction from closed database connection -idbfactory_cmp.htm IDBFactory.cmp() - compared keys return correct value -idbfactory_deleteDatabase.htm IDBFactory.deleteDatabase() - request has no source -idbfactory_deleteDatabase2.htm IDBFactory.deleteDatabase() - result of the request is set to undefined -idbfactory_open.htm IDBFactory.open() - request has no source -idbfactory_open2.htm IDBFactory.open() - database 'name' and 'version' are correctly set -idbfactory_open3.htm IDBFactory.open() - no version opens current database -idbfactory_open4.htm IDBFactory.open() - new database has default version -idbfactory_open5.htm IDBFactory.open() - new database is empty -idbfactory_open6.htm IDBFactory.open() - open database with a lower version than current -idbfactory_open7.htm IDBFactory.open() - open database with a higher version than current -idbfactory_open8.htm IDBFactory.open() - error in version change transaction aborts open -idbindex_count.htm IDBIndex.count() - returns the number of records in the index -idbindex_count2.htm IDBIndex.count() - returns the number of records that have keys within the range -idbindex_get.htm IDBIndex.get() - returns the record -idbindex_get2.htm IDBIndex.get() - returns the record where the index contains duplicate values -idbindex_get3.htm IDBIndex.get() - attempt to retrieve a record that doesn't exist -idbindex_get4.htm IDBIndex.get() - returns the record with the first key in the range -idbindex_getKey.htm IDBIndex.getKey() - returns the record's primary key -idbindex_getKey2.htm IDBIndex.getKey() - returns the record's primary key where the index contains duplicate values -idbindex_getKey3.htm IDBIndex.getKey() - attempt to retrieve the primary key of a record that doesn't exist -idbindex_getKey4.htm IDBIndex.getKey() - returns the key of the first record within the range -idbkeyrange.htm IDBKeyRange Tests -idbobjectstore_add.htm IDBObjectStore.add() - add with an inline key -idbobjectstore_add10.htm IDBObjectStore.add() - Attempt to call 'add' without an key parameter when the object store uses out-of-line keys -idbobjectstore_add11.htm IDBObjectStore.add() - Attempt to add a record where the record's key does not meet the constraints of a valid key -idbobjectstore_add12.htm IDBObjectStore.add() - Attempt to add a record where the record's in-line key is not defined -idbobjectstore_add13.htm IDBObjectStore.add() - Attempt to add a record where the out of line key provided does not meet the constraints of a valid key -idbobjectstore_add14.htm IDBObjectStore.add() - Attempt to add a record where a value being indexed does not meet the constraints of a valid key -idbobjectstore_add2.htm IDBObjectStore.add() - add with an out-of-line key -idbobjectstore_add3.htm IDBObjectStore.add() - record with same key already exists -idbobjectstore_add4.htm IDBObjectStore.add() - add where an index has unique:true specified -idbobjectstore_add5.htm IDBObjectStore.add() - object store's key path is an object attribute -idbobjectstore_add6.htm IDBObjectStore.add() - autoIncrement and inline keys -idbobjectstore_add7.htm IDBObjectStore.add() - autoIncrement and out-of-line keys -idbobjectstore_add8.htm IDBObjectStore.add() - object store has autoIncrement:true and the key path is an object attribute -idbobjectstore_add9.htm IDBObjectStore.add() - Attempt to add a record that does not meet the constraints of an object store's inline key requirements -idbobjectstore_clear.htm IDBObjectStore.clear() - Verify clear removes all records -idbobjectstore_clear2.htm IDBObjectStore.clear() - clear removes all records from an index -idbobjectstore_count.htm IDBObjectStore.count() - returns the number of records in the object store -idbobjectstore_count2.htm IDBObjectStore.count() - returns the number of records that have keys within the range -idbobjectstore_createIndex.htm IDBObjectStore.createIndex() - returns an IDBIndex and the properties are set correctly -idbobjectstore_createIndex2.htm IDBObjectStore.createIndex() - attempt to create an index that requires unique values on an object store already contains duplicates -idbobjectstore_delete.htm IDBObjectStore.delete() - delete removes record (inline keys) -idbobjectstore_delete2.htm IDBObjectStore.delete() - key doesn't match any records -idbobjectstore_delete3.htm IDBObjectStore.delete() - object store's key path is an object attribute -idbobjectstore_delete4.htm IDBObjectStore.delete() - delete removes record (out-of-line keys) -idbobjectstore_delete5.htm IDBObjectStore.delete() - removes all of the records in the range -idbobjectstore_deleteIndex.htm IDBObjectStore.deleteIndex() - removes the index -idbobjectstore_get.htm IDBObjectStore.get() - key is a number -idbobjectstore_get2.htm IDBObjectStore.get() - key is a string -idbobjectstore_get3.htm IDBObjectStore.get() - key is a Date -idbobjectstore_get4.htm IDBObjectStore.get() - attempt to retrieve a record that doesn't exist -idbobjectstore_get5.htm IDBObjectStore.get() - returns the record with the first key in the range -idbobjectstore_index.htm IDBObjectStore.index() - returns an index -idbobjectstore_put.htm IDBObjectStore.put() - put with an inline key -idbobjectstore_put10.htm IDBObjectStore.put() - Attempt to call 'put' without an key parameter when the object store uses out-of-line keys -idbobjectstore_put11.htm IDBObjectStore.put() - Attempt to put a record where the record's key does not meet the constraints of a valid key -idbobjectstore_put12.htm IDBObjectStore.put() - Attempt to put a record where the record's in-line key is not defined -idbobjectstore_put13.htm IDBObjectStore.put() - Attempt to put a record where the out of line key provided does not meet the constraints of a valid key -idbobjectstore_put14.htm IDBObjectStore.put() - Attempt to put a record where a value being indexed does not meet the constraints of a valid key -idbobjectstore_put2.htm IDBObjectStore.put() - put with an out-of-line key -idbobjectstore_put3.htm IDBObjectStore.put() - record with the same key already exists -idbobjectstore_put4.htm IDBObjectStore.put() - put where an index has unique:true specified -idbobjectstore_put5.htm IDBObjectStore.put() - object store's key path is an object attribute -idbobjectstore_put6.htm IDBObjectStore.put() - autoIncrement and inline keys -idbobjectstore_put7.htm IDBObjectStore.put() - autoIncrement and out-of-line keys -idbobjectstore_put8.htm IDBObjectStore.put() - object store has autoIncrement:true and the key path is an object attribute -idbobjectstore_put9.htm IDBObjectStore.put() - Attempt to put a record that does not meet the constraints of an object store's inline key requirements -index_sort_order.htm Verify key sort order in an index is 'number -objectstore_keyorder.htm Verify key sort order in an object store is 'number