Title: [192960] trunk/LayoutTests
Revision
192960
Author
[email protected]
Date
2015-12-02 13:33:32 -0800 (Wed, 02 Dec 2015)

Log Message

Modern IDB: Remove all traces of IDBObjectStore::openKeyCursor from tests.
https://bugs.webkit.org/show_bug.cgi?id=151772

Reviewed by Alex Christensen.

IDBObjectStore::openKeyCursor no longer exists, so testing it is inherently bogus.

* platform/mac-wk1/TestExpectations: Two tests now pass with small expectations changes.
* storage/indexeddb/cursor-basics-expected.txt:
* storage/indexeddb/cursor-overloads-expected.txt:

* storage/indexeddb/cursor-overloads.html:
* storage/indexeddb/optional-arguments.html:
* storage/indexeddb/resources/cursor-basics.js:
* storage/indexeddb/resources/deleted-objects.js:
* storage/indexeddb/resources/exceptions.js:
* storage/indexeddb/resources/objectstore-basics.js:

* storage/indexeddb/objectstore-keycursor-expected.txt: Removed.
* storage/indexeddb/objectstore-keycursor.html: Removed.
* storage/indexeddb/resources/objectstore-keycursor.js: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (192959 => 192960)


--- trunk/LayoutTests/ChangeLog	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/ChangeLog	2015-12-02 21:33:32 UTC (rev 192960)
@@ -1,3 +1,27 @@
+2015-12-02  Brady Eidson  <[email protected]>
+
+        Modern IDB: Remove all traces of IDBObjectStore::openKeyCursor from tests.
+        https://bugs.webkit.org/show_bug.cgi?id=151772
+
+        Reviewed by Alex Christensen.
+        
+        IDBObjectStore::openKeyCursor no longer exists, so testing it is inherently bogus.
+
+        * platform/mac-wk1/TestExpectations: Two tests now pass with small expectations changes.
+        * storage/indexeddb/cursor-basics-expected.txt:
+        * storage/indexeddb/cursor-overloads-expected.txt:
+
+        * storage/indexeddb/cursor-overloads.html:
+        * storage/indexeddb/optional-arguments.html:
+        * storage/indexeddb/resources/cursor-basics.js:
+        * storage/indexeddb/resources/deleted-objects.js:
+        * storage/indexeddb/resources/exceptions.js:
+        * storage/indexeddb/resources/objectstore-basics.js:
+        
+        * storage/indexeddb/objectstore-keycursor-expected.txt: Removed.
+        * storage/indexeddb/objectstore-keycursor.html: Removed.
+        * storage/indexeddb/resources/objectstore-keycursor.js: Removed.
+
 2015-12-02  David Hyatt  <[email protected]>
 
         Add some more picture element layout tests

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (192959 => 192960)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-02 21:33:32 UTC (rev 192960)
@@ -75,8 +75,10 @@
 storage/indexeddb/basics.html [ Pass ]
 storage/indexeddb/create-and-remove-object-store.html [ Pass ]
 storage/indexeddb/create-object-store-options.html [ Pass ]
+storage/indexeddb/cursor-basics.html [ Pass ]
 storage/indexeddb/cursor-cast.html [ Pass ]
 storage/indexeddb/cursor-finished.html [ Pass ]
+storage/indexeddb/cursor-overloads.html [ Pass ]
 storage/indexeddb/modern [ Pass ]
 storage/indexeddb/mozilla [ Pass ]
 storage/indexeddb/transaction-abort.html [ Pass ]

Modified: trunk/LayoutTests/storage/indexeddb/cursor-basics-expected.txt (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/cursor-basics-expected.txt	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/cursor-basics-expected.txt	2015-12-02 21:33:32 UTC (rev 192960)
@@ -14,7 +14,6 @@
 index = store.createIndex('indexName', 'indexOn')
 store.put({indexOn: 'a'}, 0)
 store.openCursor()
-store.openKeyCursor()
 index.openCursor()
 index.openKeyCursor()
 
@@ -26,8 +25,8 @@
 PASS 'primaryKey' in cursor is true
 PASS 'continue' in cursor is true
 PASS typeof cursor.continue is "function"
-PASS 'continuePrimaryKey' in cursor is true
-PASS typeof cursor.continuePrimaryKey is "function"
+FAIL 'continuePrimaryKey' in cursor should be true. Was false.
+FAIL typeof cursor.continuePrimaryKey should be function. Was undefined.
 PASS 'advance' in cursor is true
 PASS typeof cursor.advance is "function"
 PASS 'update' in cursor is true
@@ -40,28 +39,6 @@
 PASS 'value' in cursor is true
 PASS JSON.stringify(cursor.value) is "{\"indexOn\":\"a\"}"
 
-onStoreOpenKeyCursor():
-cursor = event.target.result
-PASS cursor is non-null.
-PASS cursor instanceof IDBCursor is true
-PASS 'key' in cursor is true
-PASS 'primaryKey' in cursor is true
-PASS 'continue' in cursor is true
-PASS typeof cursor.continue is "function"
-PASS 'continuePrimaryKey' in cursor is true
-PASS typeof cursor.continuePrimaryKey is "function"
-PASS 'advance' in cursor is true
-PASS typeof cursor.advance is "function"
-PASS 'update' in cursor is true
-PASS typeof cursor.update is "function"
-PASS 'delete' in cursor is true
-PASS typeof cursor.delete is "function"
-PASS cursor.key is 0
-PASS 'primaryKey' in cursor is true
-PASS cursor.primaryKey is 0
-PASS cursor instanceof IDBCursorWithValue is false
-PASS 'value' in cursor is false
-
 onIndexOpenCursor():
 cursor = event.target.result
 PASS cursor is non-null.
@@ -70,8 +47,8 @@
 PASS 'primaryKey' in cursor is true
 PASS 'continue' in cursor is true
 PASS typeof cursor.continue is "function"
-PASS 'continuePrimaryKey' in cursor is true
-PASS typeof cursor.continuePrimaryKey is "function"
+FAIL 'continuePrimaryKey' in cursor should be true. Was false.
+FAIL typeof cursor.continuePrimaryKey should be function. Was undefined.
 PASS 'advance' in cursor is true
 PASS typeof cursor.advance is "function"
 PASS 'update' in cursor is true
@@ -92,8 +69,8 @@
 PASS 'primaryKey' in cursor is true
 PASS 'continue' in cursor is true
 PASS typeof cursor.continue is "function"
-PASS 'continuePrimaryKey' in cursor is true
-PASS typeof cursor.continuePrimaryKey is "function"
+FAIL 'continuePrimaryKey' in cursor should be true. Was false.
+FAIL typeof cursor.continuePrimaryKey should be function. Was undefined.
 PASS 'advance' in cursor is true
 PASS typeof cursor.advance is "function"
 PASS 'update' in cursor is true

Modified: trunk/LayoutTests/storage/indexeddb/cursor-overloads-expected.txt (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/cursor-overloads-expected.txt	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/cursor-overloads-expected.txt	2015-12-02 21:33:32 UTC (rev 192960)
@@ -49,39 +49,6 @@
 store.openCursor(IDBKeyRange.only(0), 'prevunique')
 PASS event.target.result is non-null.
 PASS event.target.result.direction is "prevunique"
-store.openKeyCursor()
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openKeyCursor(0)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openKeyCursor(0, 'next')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openKeyCursor(0, 'nextunique')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-store.openKeyCursor(0, 'prev')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-store.openKeyCursor(0, 'prevunique')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
-store.openKeyCursor(IDBKeyRange.only(0))
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openKeyCursor(IDBKeyRange.only(0), 'next')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openKeyCursor(IDBKeyRange.only(0), 'nextunique')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-store.openKeyCursor(IDBKeyRange.only(0), 'prev')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-store.openKeyCursor(IDBKeyRange.only(0), 'prevunique')
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
 index.openCursor()
 PASS event.target.result is non-null.
 PASS event.target.result.direction is "next"

Modified: trunk/LayoutTests/storage/indexeddb/cursor-overloads.html (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/cursor-overloads.html	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/cursor-overloads.html	2015-12-02 21:33:32 UTC (rev 192960)
@@ -35,19 +35,6 @@
     checkCursorDirection("store.openCursor(IDBKeyRange.only(0), 'prev')", "prev");
     checkCursorDirection("store.openCursor(IDBKeyRange.only(0), 'prevunique')", "prevunique");
 
-    checkCursorDirection("store.openKeyCursor()", "next");
-    checkCursorDirection("store.openKeyCursor(0)", "next");
-    checkCursorDirection("store.openKeyCursor(0, 'next')", "next");
-    checkCursorDirection("store.openKeyCursor(0, 'nextunique')", "nextunique");
-    checkCursorDirection("store.openKeyCursor(0, 'prev')", "prev");
-    checkCursorDirection("store.openKeyCursor(0, 'prevunique')", "prevunique");
-
-    checkCursorDirection("store.openKeyCursor(IDBKeyRange.only(0))", "next");
-    checkCursorDirection("store.openKeyCursor(IDBKeyRange.only(0), 'next')", "next");
-    checkCursorDirection("store.openKeyCursor(IDBKeyRange.only(0), 'nextunique')", "nextunique");
-    checkCursorDirection("store.openKeyCursor(IDBKeyRange.only(0), 'prev')", "prev");
-    checkCursorDirection("store.openKeyCursor(IDBKeyRange.only(0), 'prevunique')", "prevunique");
-
     checkCursorDirection("index.openCursor()", "next");
     checkCursorDirection("index.openCursor(0)", "next");
     checkCursorDirection("index.openCursor(0, 'next')", "next");

Deleted: trunk/LayoutTests/storage/indexeddb/objectstore-keycursor-expected.txt (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/objectstore-keycursor-expected.txt	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-keycursor-expected.txt	2015-12-02 21:33:32 UTC (rev 192960)
@@ -1,335 +0,0 @@
-Test IndexedDB's objectStore.openKeyCursor + the cursor it produces in depth.
-
-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;
-
-dbname = "objectstore-keycursor.html"
-indexedDB.deleteDatabase(dbname)
-indexedDB.open(dbname)
-objectStore = db.createObjectStore('someObjectStore')
-
-Verify that specifying an invalid direction raises an exception:
-Expecting TypeError exception from objectStore.openKeyCursor(0, 'invalid-direction')
-PASS Exception was thrown.
-PASS objectStore.openKeyCursor(0, 'invalid-direction') threw TypeError: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.
-
-objectStore.add('', testData[nextToAdd])
-objectStore.add('', testData[nextToAdd])
-objectStore.add('', testData[nextToAdd])
-objectStore.add('', testData[nextToAdd])
-objectStore.add('', testData[nextToAdd])
-objectStore.add('', testData[nextToAdd])
-Scheduling tests...
-Running tests...
-
-Next test: lower open bound is 0; sorted ascending.
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower bound is 0; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 0; sorted ascending.
-PASS event.target.result is null
-
-Next test: upper bound is 0; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: lower open bound is 0; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result is null
-
-Next test: lower bound is 0; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper open bound is 0; sorted descending.
-PASS event.target.result is null
-
-Next test: upper bound is 0; sorted descending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: lower open bound is 1; sorted ascending.
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower bound is 1; sorted ascending.
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 1; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper bound is 1; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result is null
-
-Next test: lower open bound is 1; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result is null
-
-Next test: lower bound is 1; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result is null
-
-Next test: upper open bound is 1; sorted descending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper bound is 1; sorted descending.
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: lower open bound is 2; sorted ascending.
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower bound is 2; sorted ascending.
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 2; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result is null
-
-Next test: upper bound is 2; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result is null
-
-Next test: lower open bound is 2; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result is null
-
-Next test: lower bound is 2; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result is null
-
-Next test: upper open bound is 2; sorted descending.
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper bound is 2; sorted descending.
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: lower open bound is 3; sorted ascending.
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower bound is 3; sorted ascending.
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 3; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result is null
-
-Next test: upper bound is 3; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result is null
-
-Next test: lower open bound is 3; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result is null
-
-Next test: lower bound is 3; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result is null
-
-Next test: upper open bound is 3; sorted descending.
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper bound is 3; sorted descending.
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: lower open bound is 4; sorted ascending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower bound is 4; sorted ascending.
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 4; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result is null
-
-Next test: upper bound is 4; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result is null
-
-Next test: lower open bound is 4; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower bound is 4; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result is null
-
-Next test: upper open bound is 4; sorted descending.
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper bound is 4; sorted descending.
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: lower open bound is 5; sorted ascending.
-PASS event.target.result is null
-
-Next test: lower bound is 5; sorted ascending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 5; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result is null
-
-Next test: upper bound is 5; sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: lower open bound is 5; sorted descending.
-PASS event.target.result is null
-
-Next test: lower bound is 5; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: upper open bound is 5; sorted descending.
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: upper bound is 5; sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-
-Next test: null key path sorted ascending.
-PASS event.target.result.key is testData[0]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[5]
-PASS event.target.result is null
-
-Next test: null key path sorted descending.
-PASS event.target.result.key is testData[5]
-PASS event.target.result.key is testData[4]
-PASS event.target.result.key is testData[3]
-PASS event.target.result.key is testData[2]
-PASS event.target.result.key is testData[1]
-PASS event.target.result.key is testData[0]
-PASS event.target.result is null
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/storage/indexeddb/objectstore-keycursor.html (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/objectstore-keycursor.html	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-keycursor.html	2015-12-02 21:33:32 UTC (rev 192960)
@@ -1,9 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-</head>
-<body>
-<script src=""
-</body>
-</html>

Modified: trunk/LayoutTests/storage/indexeddb/optional-arguments.html (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/optional-arguments.html	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/optional-arguments.html	2015-12-02 21:33:32 UTC (rev 192960)
@@ -45,11 +45,6 @@
         function(callback) { verifyCursor("store.openCursor(IDBKeyRange.lowerBound(4))", "next", 2, callback); },
         function(callback) { verifyCursor("store.openCursor(3)", "next", 1, callback); },
 
-        function(callback) { verifyCursor("store.openKeyCursor()", "next", 5, callback); },
-        function(callback) { verifyCursor("store.openKeyCursor(null)", "next", 5, callback); },
-        function(callback) { verifyCursor("store.openKeyCursor(IDBKeyRange.lowerBound(4))", "next", 2, callback); },
-        function(callback) { verifyCursor("store.openKeyCursor(3)", "next", 1, callback); },
-
         function(callback) { verifyCursor("index.openCursor()", "next", 5, callback); },
         function(callback) { verifyCursor("index.openCursor(null)", "next", 5, callback); },
         function(callback) { verifyCursor("index.openCursor(IDBKeyRange.lowerBound('b'))", "next", 4, callback); },

Modified: trunk/LayoutTests/storage/indexeddb/resources/cursor-basics.js (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/resources/cursor-basics.js	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/resources/cursor-basics.js	2015-12-02 21:33:32 UTC (rev 192960)
@@ -19,10 +19,6 @@
     request._onsuccess_ = onStoreOpenCursor;
     request._onerror_ = unexpectedErrorCallback;
 
-    request = evalAndLog("store.openKeyCursor()");
-    request._onsuccess_ = onStoreOpenKeyCursor;
-    request._onerror_ = unexpectedErrorCallback;
-
     request = evalAndLog("index.openCursor()");
     request._onsuccess_ = onIndexOpenCursor;
     request._onerror_ = unexpectedErrorCallback;
@@ -65,20 +61,6 @@
     shouldBeEqualToString("JSON.stringify(cursor.value)", '{"indexOn":"a"}');
 }
 
-function onStoreOpenKeyCursor(evt) {
-    preamble(evt);
-    evalAndLog("cursor = event.target.result");
-    shouldBeNonNull("cursor");
-    checkCursorProperties();
-
-    shouldBe("cursor.key", "0");
-    shouldBeTrue("'primaryKey' in cursor");
-    shouldBe("cursor.primaryKey", "0");
-
-    shouldBeFalse("cursor instanceof IDBCursorWithValue");
-    shouldBeFalse("'value' in cursor");
-}
-
 function onIndexOpenCursor(evt) {
     preamble(evt);
     evalAndLog("cursor = event.target.result");

Modified: trunk/LayoutTests/storage/indexeddb/resources/deleted-objects.js (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/resources/deleted-objects.js	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/resources/deleted-objects.js	2015-12-02 21:33:32 UTC (rev 192960)
@@ -35,11 +35,6 @@
     evalAndExpectException("deletedStore.openCursor(0, 'next')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
     evalAndExpectException("deletedStore.openCursor(IDBKeyRange.only(0))", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
     evalAndExpectException("deletedStore.openCursor(IDBKeyRange.only(0), 'next')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
-    evalAndExpectException("deletedStore.openKeyCursor()", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
-    evalAndExpectException("deletedStore.openKeyCursor(0)", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
-    evalAndExpectException("deletedStore.openKeyCursor(0, 'next')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
-    evalAndExpectException("deletedStore.openKeyCursor(IDBKeyRange.only(0))", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
-    evalAndExpectException("deletedStore.openKeyCursor(IDBKeyRange.only(0), 'next')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
     evalAndExpectException("deletedStore.createIndex('name', 'path')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
     evalAndExpectException("deletedStore.index('name')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
     evalAndExpectException("deletedStore.deleteIndex('name')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");

Modified: trunk/LayoutTests/storage/indexeddb/resources/exceptions.js (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/resources/exceptions.js	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/resources/exceptions.js	2015-12-02 21:33:32 UTC (rev 192960)
@@ -199,16 +199,6 @@
     // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html
 
     debug("");
-    debug("IDBObjectStore.openKeyCursor()");
-    debug("If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.");
-    evalAndExpectException("store.openKeyCursor({})", "0", "'DataError'");
-    debug("The transaction this IDBObjectStore belongs to is not active.");
-    evalAndExpectException("storeFromInactiveTransaction.openKeyCursor()", "0", "'TransactionInactiveError'");
-    debug("The value for the direction parameter is invalid.");
-    evalAndExpectExceptionClass("store.openKeyCursor(0, 'invalid-direction')", "TypeError");
-    // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html
-
-    debug("");
     debug("IDBObjectStore.put()");
     debug('This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".');
     evalAndExpectException("storeFromReadOnlyTransaction.put(0, 0)", "0", "'ReadOnlyError'");

Modified: trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js	2015-12-02 21:33:32 UTC (rev 192960)
@@ -31,8 +31,6 @@
     shouldBeEqualToString("typeof store.clear", "function");
     shouldBeTrue("'openCursor' in store");
     shouldBeEqualToString("typeof store.openCursor", "function");
-    shouldBeTrue("'openKeyCursor' in store");
-    shouldBeEqualToString("typeof store.openKeyCursor", "function");
     shouldBeTrue("'createIndex' in store");
     shouldBeEqualToString("typeof store.createIndex", "function");
     shouldBeTrue("'index' in store");

Deleted: trunk/LayoutTests/storage/indexeddb/resources/objectstore-keycursor.js (192959 => 192960)


--- trunk/LayoutTests/storage/indexeddb/resources/objectstore-keycursor.js	2015-12-02 20:57:34 UTC (rev 192959)
+++ trunk/LayoutTests/storage/indexeddb/resources/objectstore-keycursor.js	2015-12-02 21:33:32 UTC (rev 192960)
@@ -1,209 +0,0 @@
-if (this.importScripts) {
-    importScripts('../../../resources/js-test.js');
-    importScripts('shared.js');
-}
-
-description("Test IndexedDB's objectStore.openKeyCursor + the cursor it produces in depth.");
-
-// In order of how it should be sorted by IndexedDB.
-self.testData = [
-    1,
-    2,
-    3,
-    "a",
-    "b",
-    "c"
-];
-
-indexedDBTest(prepareDatabase);
-function prepareDatabase()
-{
-    db = event.target.result;
-    event.target.transaction._onabort_ = unexpectedAbortCallback;
-
-    evalAndLog("objectStore = db.createObjectStore('someObjectStore')");
-
-    debug("");
-    debug("Verify that specifying an invalid direction raises an exception:");
-    evalAndExpectExceptionClass("objectStore.openKeyCursor(0, 'invalid-direction')", "TypeError");
-    debug("");
-
-    self.nextToAdd = 0;
-    addData();
-}
-
-function addData()
-{
-    request = evalAndLog("objectStore.add('', testData[nextToAdd])");
-    request._onsuccess_ = ++self.nextToAdd < testData.length ? addData : scheduleTests;
-    request._onerror_ = unexpectedErrorCallback;
-}
-
-function scheduleTests()
-{
-    debug("Scheduling tests...");
-    self.scheduledTests = [];
-    for (var i = 0; i < testData.length; ++i) {
-        /* left bound, is open, right bound, is open, ascending */
-        scheduledTests.unshift([i, true, null, null, true]);
-        scheduledTests.unshift([i, false, null, null, true]);
-        scheduledTests.unshift([null, null, i, true, true]);
-        scheduledTests.unshift([null, null, i, false, true]);
-        scheduledTests.unshift([i, true, null, null, false]);
-        scheduledTests.unshift([i, false, null, null, false]);
-        scheduledTests.unshift([null, null, i, true, false]);
-        scheduledTests.unshift([null, null, i, false, false]);
-        for (var j = 6; j < testData.length; ++j) {
-            scheduledTests.unshift([i, true, j, true, true]);
-            scheduledTests.unshift([i, true, j, false, true]);
-            scheduledTests.unshift([i, false, j, true, true]);
-            scheduledTests.unshift([i, false, j, false, true]);
-            scheduledTests.unshift([i, true, j, true, false]);
-            scheduledTests.unshift([i, true, j, false, false]);
-            scheduledTests.unshift([i, false, j, true, false]);
-            scheduledTests.unshift([i, false, j, false, false]);
-        }
-    }
-
-    debug("Running tests...");
-    runNextTest();
-}
-
-function runNextTest()
-{
-    if (!scheduledTests.length) {
-        testNullKeyRange();
-        return;
-    }
-
-    var test = scheduledTests.pop();
-    self.lower = test[0];
-    self.lowerIsOpen = test[1];
-    self.upper = test[2];
-    self.upperIsOpen = test[3];
-    self.ascending = test[4];
-
-    str = "Next test: ";
-    if (lower !== null) {
-        str += "lower ";
-        if (lowerIsOpen)
-            str += "open ";
-        str += "bound is " + lower + "; ";
-    }
-    if (upper !== null) {
-        str += "upper ";
-        if (upperIsOpen)
-            str += "open ";
-        str += "bound is " + upper + "; ";
-    }
-    if (ascending)
-        str += "sorted ascending.";
-    else
-        str += "sorted descending.";
-
-    debug("");
-    debug(str);
-
-    if (ascending) {
-        if (lower !== null) {
-            if (!lowerIsOpen)
-                self.expectedIndex = lower;
-            else
-                self.expectedIndex = lower+1;
-        } else
-            self.expectedIndex = 0;
-    } else {
-        if (upper !== null) {
-            if (!upperIsOpen)
-                self.expectedIndex = upper;
-            else
-                self.expectedIndex = upper-1;
-        } else
-            self.expectedIndex = testData.length-1;
-    }
-    testWithinBounds();
-
-    if (testData[lower] === testData[upper] && (lowerIsOpen || upperIsOpen)) {
-        debug("Skipping illegal key range.");
-        runNextTest();
-        return;
-    }
-
-    var keyRange;
-    if (lower !== null && upper !== null)
-        keyRange = IDBKeyRange.bound(testData[lower], testData[upper], lowerIsOpen, upperIsOpen);
-    else if (lower !== null)
-        keyRange = IDBKeyRange.lowerBound(testData[lower], lowerIsOpen);
-    else
-        keyRange = IDBKeyRange.upperBound(testData[upper], upperIsOpen);
-
-    var request = objectStore.openKeyCursor(keyRange, ascending ? 'next' : 'prev');
-    request._onsuccess_ = cursorIteration;
-    request._onerror_ = unexpectedErrorCallback;
-}
-
-function testWithinBounds()
-{
-    if (expectedIndex < 0 || testData.length <= expectedIndex)
-        self.expectedIndex = null;
-    if (lower !== null && expectedIndex < lower)
-        self.expectedIndex = null;
-    if (upper !== null && upper < expectedIndex)
-        self.expectedIndex = null;
-    if (lower !== null && lowerIsOpen && expectedIndex <= lower)
-        self.expectedIndex = null;
-    if (upper !== null && upperIsOpen && upper <= expectedIndex)
-        self.expectedIndex = null;
-}
-
-function cursorIteration()
-{
-    if (expectedIndex === null) {
-        shouldBeNull("event.target.result");
-        runNextTest();
-        return;
-    }
-    if (event.target.result === null) {
-        testFailed("event.target.result should not be null.");
-        runNextTest();
-        return;
-    }
-
-    shouldBe("event.target.result.key", "testData[" + expectedIndex + "]");
-    self.expectedIndex = ascending ? expectedIndex+1 : expectedIndex-1;
-    testWithinBounds();
-
-    event.target.result.continue();
-}
-
-self.nullKeyRangeStep = 0;
-function testNullKeyRange()
-{
-    self.lower = 0;
-    self.lowerIsOpen = false;
-    self.upper = testData.length-1;
-    self.upperIsOpen = false;
-
-    str = "Next test: null key path ";
-    if (self.nullKeyRangeStep == 0) {
-        str += "sorted ascending.";
-        self.ascending = true;
-        self.expectedIndex = lower;
-        self.nullKeyRangeStep = 1;
-    } else if (self.nullKeyRangeStep == 1) {
-        str += "sorted descending.";
-        self.ascending = false;
-        self.expectedIndex = upper;
-        self.nullKeyRangeStep = 2;
-    } else {
-        finishJSTest();
-        return;
-    }
-
-    debug("");
-    debug(str);
-
-    var request = objectStore.openKeyCursor(null, ascending ? 'next' : 'prev');
-    request._onsuccess_ = cursorIteration;
-    request._onerror_ = unexpectedErrorCallback;
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to