<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207821] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207821">207821</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-10-25 09:25:27 -0700 (Tue, 25 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>IndexedDB 2.0: Support new IDBTransaction interfaces.
<rdar://problem/28806928> and https://bugs.webkit.org/show_bug.cgi?id=163927
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
* web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt:
* web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt:
* web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:
Source/WebCore:
Tests: storage/indexeddb/modern/idbtransaction-objectstores-1-private.html
storage/indexeddb/modern/idbtransaction-objectstores-1.html
At least partially passing results on 5 previously failed W3C tests.
The "new IDBTransaction interfaces" really just means adding the property IDBTransaction.objectStoreNames.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::objectStoreNames):
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransaction.idl:
LayoutTests:
* storage/indexeddb/modern/idbtransaction-objectstores-1-expected.txt: Added.
* storage/indexeddb/modern/idbtransaction-objectstores-1-private-expected.txt: Added.
* storage/indexeddb/modern/idbtransaction-objectstores-1-private.html: Added.
* storage/indexeddb/modern/idbtransaction-objectstores-1.html: Added.
* storage/indexeddb/modern/resources/idbtransaction-objectstores-1.js: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenameabortexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenamestoreexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbtransaction_objectStoreNamesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortmultiplemetadatarevertexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortobjectstoremetadatarevertexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionidl">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1privateexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1privatehtml">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1html">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbtransactionobjectstores1js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstores-1.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/ChangeLog        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-10-25 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support new IDBTransaction interfaces.
+ <rdar://problem/28806928> and https://bugs.webkit.org/show_bug.cgi?id=163927
+
+ Reviewed by Sam Weinig.
+
+ * storage/indexeddb/modern/idbtransaction-objectstores-1-expected.txt: Added.
+ * storage/indexeddb/modern/idbtransaction-objectstores-1-private-expected.txt: Added.
+ * storage/indexeddb/modern/idbtransaction-objectstores-1-private.html: Added.
+ * storage/indexeddb/modern/idbtransaction-objectstores-1.html: Added.
+ * storage/indexeddb/modern/resources/idbtransaction-objectstores-1.js: Added.
+
</ins><span class="cx"> 2016-10-25 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Rebase test after r207805
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-10-25 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support new IDBTransaction interfaces.
+ <rdar://problem/28806928> and https://bugs.webkit.org/show_bug.cgi?id=163927
+
+ Reviewed by Sam Weinig.
+
+ * web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt:
+ * web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt:
+ * web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt:
+ * web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
+ * web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:
+
</ins><span class="cx"> 2016-10-24 Jiewen Tan <jiewen_tan@apple.com>
</span><span class="cx">
</span><span class="cx"> Update SubtleCrypto::generateKey to match the latest spec
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenameabortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,6 +1,4 @@
</span><span class="cx">
</span><del>-Harness Error (TIMEOUT), message = null
</del><ins>+PASS IndexedDB object store rename in aborted transaction
+FAIL IndexedDB object store creation and rename in an aborted transaction assert_equals: IDBObjectStore.name should reflect the last rename immediately after transaction.abort() returns expected "not_books_renamed_again" but got "not_books"
</ins><span class="cx">
</span><del>-FAIL IndexedDB object store rename in aborted transaction undefined is not an object (evaluating 'actual.length')
-TIMEOUT IndexedDB object store creation and rename in an aborted transaction Test timed out
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenamestoreexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx">
</span><del>-FAIL IndexedDB object store rename in new transaction undefined is not an object (evaluating 'actual.length')
-FAIL IndexedDB object store rename in the transaction where it is created undefined is not an object (evaluating 'actual.length')
</del><ins>+PASS IndexedDB object store rename in new transaction
+PASS IndexedDB object store rename in the transaction where it is created
</ins><span class="cx"> PASS IndexedDB object store rename covers index
</span><span class="cx"> FAIL IndexedDB object store rename covers key generator assert_equals: Renaming an object store should not change the state of its key generator expected 345680 but got 345679
</span><span class="cx"> PASS IndexedDB object store rename to the same name succeeds
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbtransaction_objectStoreNamesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx">
</span><del>-FAIL IDBTransaction.objectStoreNames - during upgrade transaction undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - value after close undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - transaction scope undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - value after commit undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - value after abort undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - sorting undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - no duplicates undefined is not an object (evaluating 'actual.length')
-FAIL IDBTransaction.objectStoreNames - unusual names undefined is not an object (evaluating 'actual.length')
</del><ins>+PASS IDBTransaction.objectStoreNames - during upgrade transaction
+PASS IDBTransaction.objectStoreNames - value after close
+PASS IDBTransaction.objectStoreNames - transaction scope
+PASS IDBTransaction.objectStoreNames - value after commit
+PASS IDBTransaction.objectStoreNames - value after abort
+PASS IDBTransaction.objectStoreNames - sorting
+FAIL IDBTransaction.objectStoreNames - no duplicates assert_array_equals: transaction objectStoreNames should not have duplicates lengths differ, expected 2 got 3
+FAIL IDBTransaction.objectStoreNames - unusual names assert_array_equals: transaction should have names sorted with no duplicates lengths differ, expected 14 got 28
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortmultiplemetadatarevertexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx">
</span><del>-FAIL Deleted indexes in newly created stores are still marked as deleted after the transaction aborts undefined is not an object (evaluating 'actual.length')
-FAIL Deleted indexes in deleted stores are still marked as not-deleted after the transaction aborts undefined is not an object (evaluating 'actual.length')
-FAIL Deleted indexes in created+deleted stores are still marked as deleted after their transaction aborts undefined is not an object (evaluating 'actual.length')
</del><ins>+FAIL Deleted indexes in newly created stores are still marked as deleted after the transaction aborts assert_throws: IDBObjectStore.get should throw InvalidStateError, indicating that the store is marked for deletion, immediately after IDBTransaction.abort() returns function "() => store.get('query')" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+FAIL Deleted indexes in deleted stores are still marked as not-deleted after the transaction aborts assert_array_equals: IDBObjectStore.indexNames for the deleted store should be empty immediately after IDBDatabase.deleteObjectStore() returns lengths differ, expected 0 got 1
+FAIL Deleted indexes in created+deleted stores are still marked as deleted after their transaction aborts assert_array_equals: IDBObjectStore.indexNames should be empty immediately after IDBDatabase.deleteObjectStore() returns lengths differ, expected 0 got 1
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortobjectstoremetadatarevertexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx">
</span><del>-FAIL Created stores get marked as deleted after their transaction aborts undefined is not an object (evaluating 'actual.length')
-FAIL Deleted stores get marked as not-deleted after the transaction aborts undefined is not an object (evaluating 'actual.length')
-FAIL Created+deleted stores are still marked as deleted after their transaction aborts undefined is not an object (evaluating 'actual.length')
-FAIL Un-instantiated deleted stores get marked as not-deleted after the transaction aborts undefined is not an object (evaluating 'actual.length')
</del><ins>+FAIL Created stores get marked as deleted after their transaction aborts assert_throws: IDBObjectStore.get should throw InvalidStateError, indicating that the store is marked for deletion, immediately after IDBTransaction.abort() returns function "() => store.get('query')" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+PASS Deleted stores get marked as not-deleted after the transaction aborts
+FAIL Created+deleted stores are still marked as deleted after their transaction aborts assert_throws: IDBObjectStore.get should throw InvalidStateError, indicating that the store is still marked for deletion, immediately after IDBTransaction.abort() returns function "() => store.get('query')" threw object "TransactionInactiveError (DOM IDBDatabase Exception): Fai..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+PASS Un-instantiated deleted stores get marked as not-deleted after the transaction aborts
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-expected.txt (0 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+This tests the IDBTransaction.objectStoreNames API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Upgrade needed: Old version - 0 New version - 1
+List has 1 entries
+Entry 0: ObjectStore1
+List has 2 entries
+Entry 0: ObjectStore1
+Entry 1: ObjectStore2
+List has 1 entries
+Entry 0: ObjectStore2
+List has 3 entries
+Entry 0: ObjectStore2
+Entry 1: ObjectStore3
+Entry 2: ObjectStore4
+Version change transaction complete
+List has 3 entries
+Entry 0: ObjectStore2
+Entry 1: ObjectStore3
+Entry 2: ObjectStore4
+List has 2 entries
+Entry 0: ObjectStore2
+Entry 1: ObjectStore4
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1privateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private-expected.txt (0 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private-expected.txt        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+This tests the IDBTransaction.objectStoreNames API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Upgrade needed: Old version - 0 New version - 1
+List has 1 entries
+Entry 0: ObjectStore1
+List has 2 entries
+Entry 0: ObjectStore1
+Entry 1: ObjectStore2
+List has 1 entries
+Entry 0: ObjectStore2
+List has 3 entries
+Entry 0: ObjectStore2
+Entry 1: ObjectStore3
+Entry 2: ObjectStore4
+Version change transaction complete
+List has 3 entries
+Entry 0: ObjectStore2
+Entry 1: ObjectStore3
+Entry 2: ObjectStore4
+List has 2 entries
+Entry 0: ObjectStore2
+Entry 1: ObjectStore4
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1privatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private.html (0 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1-private.html        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<html>
+<head>
+<script>
+enablePrivateBrowsing = true;
+</script>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbtransaction-objectstores-1.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstores1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1.html (0 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstores-1.html        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbtransaction-objectstores-1.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbtransactionobjectstores1js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstores-1.js (0 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstores-1.js         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstores-1.js        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+description("This tests the IDBTransaction.objectStoreNames API");
+
+indexedDBTest(prepareDatabase);
+
+function done()
+{
+ finishJSTest();
+}
+
+function dumpList(list)
+{
+        debug("List has " + list.length + " entries");
+        
+        for (i = 0; i < list.length; ++i)
+                debug("Entry " + i + ": " + list.item(i));
+}
+
+function prepareDatabase(event)
+{
+ debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var tx = event.target.transaction;
+ db = event.target.result;
+
+        db.createObjectStore("ObjectStore1");
+        dumpList(tx.objectStoreNames);
+
+        db.createObjectStore("ObjectStore2");
+        dumpList(tx.objectStoreNames);
+
+        db.deleteObjectStore("ObjectStore1");
+        dumpList(tx.objectStoreNames);
+
+        db.createObjectStore("ObjectStore3");
+        db.createObjectStore("ObjectStore4");
+        dumpList(tx.objectStoreNames);
+        
+ tx.onabort = function(event) {
+ debug("Version change transaction unexpected abort");
+ done();
+ }
+
+ tx.oncomplete = function(event) {
+ debug("Version change transaction complete");
+ continueTest();
+ }
+
+ tx.onerror = function(event) {
+ debug("Version change transaction unexpected error");
+ done();
+ }
+}
+
+function continueTest()
+{
+        tx = db.transaction(["ObjectStore2", "ObjectStore3", "ObjectStore4"]);
+        dumpList(tx.objectStoreNames);
+
+        tx = db.transaction(["ObjectStore2", "ObjectStore4"]);
+        dumpList(tx.objectStoreNames);
+        
+        done();
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/Source/WebCore/ChangeLog        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-10-25 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support new IDBTransaction interfaces.
+ <rdar://problem/28806928> and https://bugs.webkit.org/show_bug.cgi?id=163927
+
+ Reviewed by Sam Weinig.
+
+ Tests: storage/indexeddb/modern/idbtransaction-objectstores-1-private.html
+ storage/indexeddb/modern/idbtransaction-objectstores-1.html
+ At least partially passing results on 5 previously failed W3C tests.
+
+ The "new IDBTransaction interfaces" really just means adding the property IDBTransaction.objectStoreNames.
+
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::objectStoreNames):
+ * Modules/indexeddb/IDBTransaction.h:
+ * Modules/indexeddb/IDBTransaction.idl:
+
</ins><span class="cx"> 2016-10-25 Youenn Fablet <youenn@apple.com>
</span><span class="cx">
</span><span class="cx"> MediaEndpointConfiguration does not need to be refcounted
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="cx"> #include "DOMError.h"
</span><ins>+#include "DOMStringList.h"
</ins><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "Event.h"
</span><span class="cx"> #include "EventNames.h"
</span><span class="lines">@@ -168,6 +169,20 @@
</span><span class="cx"> return m_database->connectionProxy();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+Ref<DOMStringList> IDBTransaction::objectStoreNames() const
+{
+ ASSERT(currentThread() == m_database->originThreadID());
+
+ const Vector<String> names = isVersionChange() ? m_database->info().objectStoreNames() : m_info.objectStores();
+
+ Ref<DOMStringList> objectStoreNames = DOMStringList::create();
+ for (auto& name : names)
+ objectStoreNames->append(name);
+
+ objectStoreNames->sort();
+ return objectStoreNames;
+}
+
</ins><span class="cx"> const String& IDBTransaction::mode() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == m_database->originThreadID());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class DOMError;
</span><ins>+class DOMStringList;
</ins><span class="cx"> class IDBCursor;
</span><span class="cx"> class IDBCursorInfo;
</span><span class="cx"> class IDBDatabase;
</span><span class="lines">@@ -78,6 +79,7 @@
</span><span class="cx"> ~IDBTransaction() final;
</span><span class="cx">
</span><span class="cx"> // IDBTransaction IDL
</span><ins>+ Ref<DOMStringList> objectStoreNames() const;
</ins><span class="cx"> const String& mode() const;
</span><span class="cx"> IDBDatabase* db();
</span><span class="cx"> DOMError* error() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl (207820 => 207821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl        2016-10-25 15:52:25 UTC (rev 207820)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl        2016-10-25 16:25:27 UTC (rev 207821)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> EnabledAtRuntime=IndexedDB,
</span><span class="cx"> SkipVTableValidation,
</span><span class="cx"> ] interface IDBTransaction : EventTarget {
</span><ins>+ readonly attribute DOMStringList objectStoreNames;
</ins><span class="cx"> readonly attribute DOMString mode;
</span><span class="cx"> readonly attribute IDBDatabase db;
</span><span class="cx"> readonly attribute DOMError error;
</span></span></pre>
</div>
</div>
</body>
</html>