idbfactory_deleteDatabase2.htm
<!DOCTYPE html>
<html>
<head>
<title>IDBFactory.deleteDatabase() - result of the request is set to undefined</title>
<script type="text/javascript" src="support.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type="text/javascript">
var objectStoreName = "objectstore";
var db = null;
var t = async_test();
function RunTest() {
var req = window.indexedDB.deleteDatabase(objectStoreName);
req.onerror = t.step_func(function(event) { assert_deleteDatabase_request_error(event); });
req.onsuccess = t.step_func( function (event) {
assert_equals(event.target.result, undefined, "event.target.result");
t.done();
});
}
add_completion_callback(function() { if(db) db.close(); });
setup(function() {
var rqDelete = window.indexedDB.deleteDatabase(databaseName);
rqDelete.onsuccess = t.step_func( RunTest );
});
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>