diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /LayoutTests/storage/indexeddb/basics.html | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'LayoutTests/storage/indexeddb/basics.html')
-rw-r--r-- | LayoutTests/storage/indexeddb/basics.html | 42 |
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; |