IndexedDB: No test covers cursor.delete() setting the source of the request to the...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Feb 2016 19:31:48 +0000 (19:31 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Feb 2016 19:31:48 +0000 (19:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153992

Reviewed by Jer Noble.

* storage/indexeddb/cursor-delete-expected.txt:
* storage/indexeddb/cursor-delete-private-expected.txt:
* storage/indexeddb/resources/cursor-delete.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/cursor-delete-expected.txt
LayoutTests/storage/indexeddb/cursor-delete-private-expected.txt
LayoutTests/storage/indexeddb/resources/cursor-delete.js

index 425b3f1..1b02c24 100644 (file)
@@ -1,3 +1,14 @@
+2016-02-08  Brady Eidson  <beidson@apple.com>
+
+        IndexedDB: No test covers cursor.delete() setting the source of the request to the cursor.
+        https://bugs.webkit.org/show_bug.cgi?id=153992
+
+        Reviewed by Jer Noble.
+
+        * storage/indexeddb/cursor-delete-expected.txt:
+        * storage/indexeddb/cursor-delete-private-expected.txt:
+        * storage/indexeddb/resources/cursor-delete.js:
+
 2016-02-08  Skachkov Oleksandr  <gskachkov@gmail.com>
 
         [ES6] Arrow function syntax. Using 'super' in arrow function that declared out of the class should lead to Syntax error
index 318dd00..ea6a365 100644 (file)
@@ -18,16 +18,20 @@ objectStore.add('myValue4', 'myKey4')
 openCursor1
 trans = db.transaction(['test'], 'readwrite')
 trans.objectStore('test').openCursor(keyRange)
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue1"
 event.target.result.continue()
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue2"
 event.target.result.continue()
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue3"
 event.target.result.continue()
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue4"
 event.target.result.continue()
 PASS counter is 5
@@ -39,7 +43,8 @@ objectStore.add('myValue1', 'myKey1')
 openCursor2
 objectStore.openCursor(keyRange)
 PASS [object IDBCursorWithValue] is non-null.
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 objectStore.get('myKey1')
 PASS event.target.result is undefined
 PASS successfullyParsed is true
index 318dd00..ea6a365 100644 (file)
@@ -18,16 +18,20 @@ objectStore.add('myValue4', 'myKey4')
 openCursor1
 trans = db.transaction(['test'], 'readwrite')
 trans.objectStore('test').openCursor(keyRange)
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue1"
 event.target.result.continue()
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue2"
 event.target.result.continue()
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue3"
 event.target.result.continue()
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 PASS event.target.result.value is "myValue4"
 event.target.result.continue()
 PASS counter is 5
@@ -39,7 +43,8 @@ objectStore.add('myValue1', 'myKey1')
 openCursor2
 objectStore.openCursor(keyRange)
 PASS [object IDBCursorWithValue] is non-null.
-event.target.result.delete()
+deleteRequest = event.target.result.delete()
+PASS deleteRequest.source is event.target.result
 objectStore.get('myKey1')
 PASS event.target.result is undefined
 PASS successfullyParsed is true
index 02bdd35..45d8678 100644 (file)
@@ -41,7 +41,8 @@ function cursorSuccess()
         request.onerror = unexpectedErrorCallback;
         return;
     }
-    evalAndLog("event.target.result.delete()");
+    evalAndLog("deleteRequest = event.target.result.delete()");
+    shouldBe("deleteRequest.source", "event.target.result");
     shouldBeEqualToString("event.target.result.value", "myValue" + counter++);
     evalAndLog("event.target.result.continue()");
 }
@@ -72,7 +73,8 @@ function openCursor2()
 function deleteObject()
 {
     shouldBeNonNull(event.target.result);
-    evalAndLog("event.target.result.delete()");
+    evalAndLog("deleteRequest = event.target.result.delete()");
+    shouldBe("deleteRequest.source", "event.target.result");
     request = evalAndLog("objectStore.get('myKey1')");
     request.onsuccess = verifyObjectDeleted;
     request.onerror = unexpectedErrorCallback;