- Revision
- 128370
- Author
- jsb...@chromium.org
- Date
- 2012-09-12 15:22:07 -0700 (Wed, 12 Sep 2012)
Log Message
IndexedDB: The |source| property of IDBFactory.open() request should be null
https://bugs.webkit.org/show_bug.cgi?id=96551
Reviewed by Tony Chang.
Source/WebCore:
Per the IDB spec, the source property of the IDBOpenDBRequest returned by IDBFactory.open()
should be set to null. We were setting it to the IDBFactory object instead.
Tests: storage/indexeddb/basics.html
storage/indexeddb/basics-workers.html
storage/indexeddb/mozilla/event-source.html
storage/indexeddb/readonly.html
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
LayoutTests:
Already tested for in several places, so just update expectations/assertions.
* storage/indexeddb/basics-expected.txt:
* storage/indexeddb/basics-workers-expected.txt:
* storage/indexeddb/mozilla/event-source-expected.txt:
* storage/indexeddb/mozilla/resources/event-source.js: Updated assertion.
(openSuccess):
* storage/indexeddb/readonly-expected.txt:
* storage/indexeddb/resources/basics.js: Updated assertion.
(test):
(openCallback):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (128369 => 128370)
--- trunk/LayoutTests/ChangeLog 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/ChangeLog 2012-09-12 22:22:07 UTC (rev 128370)
@@ -1,3 +1,22 @@
+2012-09-12 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: The |source| property of IDBFactory.open() request should be null
+ https://bugs.webkit.org/show_bug.cgi?id=96551
+
+ Reviewed by Tony Chang.
+
+ Already tested for in several places, so just update expectations/assertions.
+
+ * storage/indexeddb/basics-expected.txt:
+ * storage/indexeddb/basics-workers-expected.txt:
+ * storage/indexeddb/mozilla/event-source-expected.txt:
+ * storage/indexeddb/mozilla/resources/event-source.js: Updated assertion.
+ (openSuccess):
+ * storage/indexeddb/readonly-expected.txt:
+ * storage/indexeddb/resources/basics.js: Updated assertion.
+ (test):
+ (openCallback):
+
2012-09-12 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r128353.
Modified: trunk/LayoutTests/storage/indexeddb/basics-expected.txt (128369 => 128370)
--- trunk/LayoutTests/storage/indexeddb/basics-expected.txt 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/storage/indexeddb/basics-expected.txt 2012-09-12 22:22:07 UTC (rev 128370)
@@ -26,7 +26,7 @@
PASS code is DOMException.INVALID_STATE_ERR
PASS ename is 'InvalidStateError'
PASS 'source' in request is true
-PASS request.source is indexedDB
+PASS request.source is null
PASS 'transaction' in request is true
PASS request.transaction is null
PASS 'readyState' in request is true
@@ -44,7 +44,7 @@
PASS 'error' in event.target is true
PASS event.target.error is null
PASS 'source' in event.target is true
-PASS request.source is indexedDB
+PASS request.source is null
PASS 'transaction' in event.target is true
PASS event.target.transaction is null
PASS 'readyState' in request is true
Modified: trunk/LayoutTests/storage/indexeddb/basics-workers-expected.txt (128369 => 128370)
--- trunk/LayoutTests/storage/indexeddb/basics-workers-expected.txt 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/storage/indexeddb/basics-workers-expected.txt 2012-09-12 22:22:07 UTC (rev 128370)
@@ -27,7 +27,7 @@
PASS [Worker] code is DOMException.INVALID_STATE_ERR
PASS [Worker] ename is 'InvalidStateError'
PASS [Worker] 'source' in request is true
-PASS [Worker] request.source is indexedDB
+PASS [Worker] request.source is null
PASS [Worker] 'transaction' in request is true
PASS [Worker] request.transaction is null
PASS [Worker] 'readyState' in request is true
@@ -45,7 +45,7 @@
PASS [Worker] 'error' in event.target is true
PASS [Worker] event.target.error is null
PASS [Worker] 'source' in event.target is true
-PASS [Worker] request.source is indexedDB
+PASS [Worker] request.source is null
PASS [Worker] 'transaction' in event.target is true
PASS [Worker] event.target.transaction is null
PASS [Worker] 'readyState' in request is true
Modified: trunk/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt (128369 => 128370)
--- trunk/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt 2012-09-12 22:22:07 UTC (rev 128370)
@@ -7,7 +7,7 @@
indexedDB.open(name)
source = event.target.source;
-PASS source is indexedDB
+PASS source is null
db = event.target.result
request = db.setVersion('1')
source = event.target.source;
Modified: trunk/LayoutTests/storage/indexeddb/mozilla/resources/event-source.js (128369 => 128370)
--- trunk/LayoutTests/storage/indexeddb/mozilla/resources/event-source.js 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/resources/event-source.js 2012-09-12 22:22:07 UTC (rev 128370)
@@ -24,7 +24,7 @@
function openSuccess()
{
source = evalAndLog("source = event.target.source;");
- shouldBe("source", "indexedDB");
+ shouldBeNull("source");
db = evalAndLog("db = event.target.result");
request = evalAndLog("request = db.setVersion('1')");
Modified: trunk/LayoutTests/storage/indexeddb/readonly-expected.txt (128369 => 128370)
--- trunk/LayoutTests/storage/indexeddb/readonly-expected.txt 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/storage/indexeddb/readonly-expected.txt 2012-09-12 22:22:07 UTC (rev 128370)
@@ -17,7 +17,7 @@
PASS request.error is still null
trying to set readonly property request.source
request.source = this
-PASS request.source is still [object IDBFactory]
+PASS request.source is still null
trying to set readonly property request.transaction
request.transaction = this
PASS request.transaction is still null
Modified: trunk/LayoutTests/storage/indexeddb/resources/basics.js (128369 => 128370)
--- trunk/LayoutTests/storage/indexeddb/resources/basics.js 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/LayoutTests/storage/indexeddb/resources/basics.js 2012-09-12 22:22:07 UTC (rev 128370)
@@ -17,7 +17,7 @@
evalAndExpectException("request.webkitErrorMessage", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
evalAndExpectException("request.error", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
shouldBeTrue("'source' in request");
- shouldBe("request.source", "indexedDB");
+ shouldBeNull("request.source");
shouldBeTrue("'transaction' in request");
shouldBeNull("request.transaction");
shouldBeTrue("'readyState' in request");
@@ -42,7 +42,7 @@
shouldBeTrue("'error' in event.target");
shouldBeNull("event.target.error");
shouldBeTrue("'source' in event.target");
- shouldBe("request.source", "indexedDB");
+ shouldBeNull("request.source");
shouldBeTrue("'transaction' in event.target");
shouldBeNull("event.target.transaction");
shouldBeTrue("'readyState' in request");
Modified: trunk/Source/WebCore/ChangeLog (128369 => 128370)
--- trunk/Source/WebCore/ChangeLog 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/Source/WebCore/ChangeLog 2012-09-12 22:22:07 UTC (rev 128370)
@@ -1,3 +1,21 @@
+2012-09-12 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: The |source| property of IDBFactory.open() request should be null
+ https://bugs.webkit.org/show_bug.cgi?id=96551
+
+ Reviewed by Tony Chang.
+
+ Per the IDB spec, the source property of the IDBOpenDBRequest returned by IDBFactory.open()
+ should be set to null. We were setting it to the IDBFactory object instead.
+
+ Tests: storage/indexeddb/basics.html
+ storage/indexeddb/basics-workers.html
+ storage/indexeddb/mozilla/event-source.html
+ storage/indexeddb/readonly.html
+
+ * Modules/indexeddb/IDBFactory.cpp:
+ (WebCore::IDBFactory::open):
+
2012-09-12 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r128353.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (128369 => 128370)
--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp 2012-09-12 22:20:34 UTC (rev 128369)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp 2012-09-12 22:22:07 UTC (rev 128370)
@@ -120,7 +120,7 @@
if (!isContextValid(context))
return 0;
- RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, IDBAny::create(this), version);
+ RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, IDBAny::createNull(), version);
m_backend->open(name, version, request, context->securityOrigin(), context, getIndexedDBDatabasePath(context));
return request;
}