summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/storage/indexeddb/script-tests/idb-database-request.js')
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/idb-database-request.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js b/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js
new file mode 100644
index 0000000..ae6a563
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js
@@ -0,0 +1,31 @@
+description("Test IndexedDB's IDBDatabaseRequest.");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function openSuccess()
+{
+ verifySuccessEvent(event);
+
+ var db = evalAndLog("db = event.result");
+ shouldBeEqualToString("db.name", "name");
+ shouldBeEqualToString("db.description", "description");
+ shouldBeEqualToString("db.version", "");
+ shouldBe("db.objectStores", "[]");
+ shouldBe("db.objectStores.length", "0");
+ shouldBe("db.objectStores.contains('')", "false");
+ // FIXME: Test .item() once it's possible to get back a non-empty list.
+
+ // FIXME: Test the other properties of IDBDatabase as they're written.
+
+ done();
+}
+
+function test()
+{
+ result = evalAndLog("indexedDB.open('name', 'description')");
+ verifyResult(result);
+ result.onsuccess = openSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+test();