| Index: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index8.htm
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index5.htm b/third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index8.htm
|
| similarity index 56%
|
| copy from third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index5.htm
|
| copy to third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index8.htm
|
| index c8253e54b11075f7254611745dda7d4e26ae0961..27b17f6f268d30b0e6f83278c72b68445dd57cff 100644
|
| --- a/third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index5.htm
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index8.htm
|
| @@ -1,7 +1,7 @@
|
| <!DOCTYPE html>
|
| -<title>IDBCursor.update() - index - throw DataCloneError</title>
|
| -<link rel="author" title="Intel" href="http://www.intel.com">
|
| -<link rel="help" href="https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBCursor-update-IDBRequest-any-value">
|
| +<title>IDBCursor.update() - index - throw InvalidStateError when the cursor is being iterated</title>
|
| +<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
| +<link rel="help" href="https://www.w3.org/TR/IndexedDB/#widl-IDBCursor-update-IDBRequest-any-value">
|
| <script src="../../../resources/testharness.js"></script>
|
| <script src="../../../resources/testharnessreport.js"></script>
|
| <script src="support.js"></script>
|
| @@ -16,7 +16,7 @@
|
| open_rq.onupgradeneeded = function(e) {
|
| db = e.target.result;
|
|
|
| - var objStore = db.createObjectStore("test", { keyPath: "pKey" });
|
| + var objStore = db.createObjectStore("store", { keyPath: "pKey" });
|
| objStore.createIndex("index", "iKey");
|
|
|
| for (var i = 0; i < records.length; i++)
|
| @@ -24,20 +24,20 @@
|
| };
|
|
|
| open_rq.onsuccess = function(e) {
|
| - var cursor_rq = db.transaction("test", "readwrite")
|
| - .objectStore("test")
|
| + var cursor_rq = db.transaction("store", "readwrite")
|
| + .objectStore("store")
|
| .index("index")
|
| .openCursor();
|
|
|
| cursor_rq.onsuccess = t.step_func(function(e) {
|
| var cursor = e.target.result;
|
| - assert_true(cursor instanceof IDBCursor);
|
| + assert_true(cursor instanceof IDBCursor, "cursor exists");
|
|
|
| - var record = cursor.value;
|
| - record.data = document;
|
| - assert_throws('DataCloneError', function() {
|
| - cursor.update(record);
|
| + cursor.continue();
|
| + assert_throws("InvalidStateError", function() {
|
| + cursor.update({ pKey: "primaryKey_0", iKey: "indexKey_0_updated" });
|
| });
|
| +
|
| t.done();
|
| });
|
| }
|
|
|