summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/basics.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/storage/indexeddb/basics.html')
-rw-r--r--LayoutTests/storage/indexeddb/basics.html42
1 files changed, 32 insertions, 10 deletions
diff --git a/LayoutTests/storage/indexeddb/basics.html b/LayoutTests/storage/indexeddb/basics.html
index 9f5f20f..2e382b2 100644
--- a/LayoutTests/storage/indexeddb/basics.html
+++ b/LayoutTests/storage/indexeddb/basics.html
@@ -14,25 +14,47 @@ description("Test IndexedDB's basics.");
if (window.layoutTestController)
layoutTestController.waitUntilDone();
-function openCallback()
-{
- verifySuccessEvent(event);
- done();
-}
-
function test()
{
- shouldBeTrue("'indexedDB' in window");
- shouldBeFalse("indexedDB == null");
+ shouldBeTrue("'webkitIndexedDB' in window");
+ shouldBeFalse("webkitIndexedDB == null");
// FIXME: Verify other IndexedDatabaseRequest constructors, once they're implemented.
- result = evalAndLog("indexedDB.open('name', 'description')");
+ result = evalAndLog("webkitIndexedDB.open('name', 'description')");
verifyResult(result);
result.onsuccess = openCallback;
- result.onerror = unexpectedErrorCallback;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function openCallback()
+{
+ verifySuccessEvent(event);
+ try {
+ debug("webkitIndexedDB.open('name');");
+ webkitIndexedDB.open('name');
+ testFailed("Calling IDBFactory::open without a description should have thrown.");
+ } catch (err) {
+ testPassed("Exception thrown.");
+ }
+ try {
+ debug("webkitIndexedDB.open('name', null);");
+ webkitIndexedDB.open('name', null);
+ testFailed("Calling IDBFactory::open with a null description should have thrown.");
+ } catch (err) {
+ testPassed("Exception thrown.");
+ }
+ try {
+ debug("webkitIndexedDB.open('name', undefined);");
+ webkitIndexedDB.open('name', undefined);
+ testFailed("Calling IDBFactory::open with an undefined description should have thrown.");
+ } catch (err) {
+ testPassed("Exception thrown.");
+ }
+ done();
}
+
test();
var successfullyParsed = true;