Title: [128795] trunk
Revision
128795
Author
[email protected]
Date
2012-09-17 13:00:11 -0700 (Mon, 17 Sep 2012)

Log Message

IndexedDB: Result of IDBFactory.deleteDatabase() should be undefined, not null
https://bugs.webkit.org/show_bug.cgi?id=96538

Reviewed by Tony Chang.

Source/WebCore:

Trivial implementation change to match the spec.

Tests: storage/indexeddb/factory-deletedatabase-expected.html
       storage/indexeddb/intversion-long-queue-expected.html

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):

LayoutTests:

Check result of IDBFactory.deleteDatabase() - one updated assertion, one added assertion.

* storage/indexeddb/factory-deletedatabase-expected.txt:
* storage/indexeddb/intversion-long-queue-expected.txt:
* storage/indexeddb/resources/factory-deletedatabase.js: Add new assertion.
(reopenDatabase):
* storage/indexeddb/resources/intversion-long-queue.js: Update existing assertion.
(deleteDatabaseSuccessCallback):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (128794 => 128795)


--- trunk/LayoutTests/ChangeLog	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/LayoutTests/ChangeLog	2012-09-17 20:00:11 UTC (rev 128795)
@@ -1,3 +1,19 @@
+2012-09-17  Joshua Bell  <[email protected]>
+
+        IndexedDB: Result of IDBFactory.deleteDatabase() should be undefined, not null
+        https://bugs.webkit.org/show_bug.cgi?id=96538
+
+        Reviewed by Tony Chang.
+
+        Check result of IDBFactory.deleteDatabase() - one updated assertion, one added assertion.
+
+        * storage/indexeddb/factory-deletedatabase-expected.txt:
+        * storage/indexeddb/intversion-long-queue-expected.txt:
+        * storage/indexeddb/resources/factory-deletedatabase.js: Add new assertion.
+        (reopenDatabase):
+        * storage/indexeddb/resources/intversion-long-queue.js: Update existing assertion.
+        (deleteDatabaseSuccessCallback):
+
 2012-09-17  Alexey Proskuryakov  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=96942

Modified: trunk/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt (128794 => 128795)


--- trunk/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt	2012-09-17 20:00:11 UTC (rev 128795)
@@ -20,6 +20,7 @@
 PASS event.target.result is "value"
 db.setVersion('new version')
 request = indexedDB.deleteDatabase('database-to-delete')
+PASS request.result is undefined.
 indexedDB.open('database-to-delete')
 db = event.target.result
 db.setVersion('new version')

Modified: trunk/LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt (128794 => 128795)


--- trunk/LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt	2012-09-17 20:00:11 UTC (rev 128795)
@@ -63,7 +63,7 @@
 deleteDatabaseSuccessCallback():
 FAIL event.oldVersion should be non-null. Was undefined
 FAIL event.newVersion should be null (of type object). Was undefined (of type undefined).
-PASS event.target.result is null
+PASS event.target.result is undefined.
 
 upgradeNeededCallback():
 gotUpgradeNeededEvent = true

Modified: trunk/LayoutTests/storage/indexeddb/resources/factory-deletedatabase.js (128794 => 128795)


--- trunk/LayoutTests/storage/indexeddb/resources/factory-deletedatabase.js	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/LayoutTests/storage/indexeddb/resources/factory-deletedatabase.js	2012-09-17 20:00:11 UTC (rev 128795)
@@ -67,6 +67,7 @@
 
 function reopenDatabase()
 {
+    shouldBeUndefined("request.result");
     request = evalAndLog("indexedDB.open('database-to-delete')");
     request._onsuccess_ = startSetVersionAgain;
     request._onerror_ = unexpectedErrorCallback;

Modified: trunk/LayoutTests/storage/indexeddb/resources/intversion-long-queue.js (128794 => 128795)


--- trunk/LayoutTests/storage/indexeddb/resources/intversion-long-queue.js	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/LayoutTests/storage/indexeddb/resources/intversion-long-queue.js	2012-09-17 20:00:11 UTC (rev 128795)
@@ -109,7 +109,7 @@
     preamble(evt);
     shouldBeNonNull("event.oldVersion");
     shouldBeNull("event.newVersion");
-    shouldBeNull("event.target.result");
+    shouldBeUndefined("event.target.result");
 }
 
 var gotUpgradeNeededEvent = false;

Modified: trunk/Source/WebCore/ChangeLog (128794 => 128795)


--- trunk/Source/WebCore/ChangeLog	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/Source/WebCore/ChangeLog	2012-09-17 20:00:11 UTC (rev 128795)
@@ -1,3 +1,18 @@
+2012-09-17  Joshua Bell  <[email protected]>
+
+        IndexedDB: Result of IDBFactory.deleteDatabase() should be undefined, not null
+        https://bugs.webkit.org/show_bug.cgi?id=96538
+
+        Reviewed by Tony Chang.
+
+        Trivial implementation change to match the spec.
+
+        Tests: storage/indexeddb/factory-deletedatabase-expected.html
+               storage/indexeddb/intversion-long-queue-expected.html
+
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
+
 2012-09-17  Rick Byers  <[email protected]>
 
         Allow gesture events to set active/hover state.

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp (128794 => 128795)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2012-09-17 19:39:39 UTC (rev 128794)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2012-09-17 20:00:11 UTC (rev 128795)
@@ -550,7 +550,7 @@
     m_id = InvalidId;
     m_intVersion = IDBDatabaseMetadata::NoIntVersion;
     m_objectStores.clear();
-    callbacks->onSuccess(SerializedScriptValue::nullValue());
+    callbacks->onSuccess(SerializedScriptValue::undefinedValue());
 }
 
 void IDBDatabaseBackendImpl::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to