Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index8.htm

Issue 2015623004: Import wpt@ed94c51f3dfaa5ff4c9c311add1a560408059c51 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
});
}

Powered by Google App Engine
This is Rietveld 408576698