2 <title>IDBCursor.update() - index - no argument
</title>
3 <link rel=
"author" title=
"Intel" href=
"http://www.intel.com">
4 <link rel=
"help" href=
"https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBCursor-update-IDBRequest-any-value">
5 <script src=
"/resources/testharness.js"></script>
6 <script src=
"/resources/testharnessreport.js"></script>
7 <script src=
"resources/support.js"></script>
12 records
= [ { pKey
: "primaryKey_0", iKey
: "indexKey_0" },
13 { pKey
: "primaryKey_1", iKey
: "indexKey_1" } ];
15 var open_rq
= createdb(t
);
16 open_rq
.onupgradeneeded = function(e
) {
19 var objStore
= db
.createObjectStore("test", { keyPath
: "pKey" });
20 objStore
.createIndex("index", "iKey");
22 for (var i
= 0; i
< records
.length
; i
++)
23 objStore
.add(records
[i
]);
26 open_rq
.onsuccess = function(e
) {
27 var cursor_rq
= db
.transaction("test", "readonly", {durability
: 'relaxed'})
32 cursor_rq
.onsuccess
= t
.step_func(function(e
) {
33 var cursor
= e
.target
.result
;
34 assert_true(cursor
instanceof IDBCursor
);
36 assert_throws_js(TypeError
, function() { cursor
.update(); });