summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/IndexedDB/idbfactory-deleteDatabase-request-success.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/IndexedDB/idbfactory-deleteDatabase-request-success.html')
-rw-r--r--testing/web-platform/tests/IndexedDB/idbfactory-deleteDatabase-request-success.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/IndexedDB/idbfactory-deleteDatabase-request-success.html b/testing/web-platform/tests/IndexedDB/idbfactory-deleteDatabase-request-success.html
new file mode 100644
index 0000000000..130c427a40
--- /dev/null
+++ b/testing/web-platform/tests/IndexedDB/idbfactory-deleteDatabase-request-success.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>IDBFactory deleteDatabase(): request properties on success</title>
+<link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbfactory-deleteDatabase">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=resources/support.js></script>
+<script>
+
+async_test(t => {
+ const dbname = document.location + '-' + t.name;
+ const rq = indexedDB.deleteDatabase(dbname);
+ rq.onerror = t.unreached_func('deleteDatabase should succeed');
+ rq.onsuccess = t.step_func(() => {
+ assert_equals(
+ rq.readyState, 'done',
+ 'request done flag should be set on success');
+ assert_equals(
+ rq.result, undefined,
+ 'request result should still be set to undefined on success');
+ assert_equals(
+ rq.error, null,
+ 'request error should be null on success');
+ t.done();
+ });
+}, 'Properties of IDBOpenDBRequest during IDBFactory deleteDatabase()');
+
+</script>