2 <script src=
"../../resources/js-test.js"></script>
3 <script src=
"resources/shared.js"></script>
6 description("Verify that a request's result is dirtied when a cursor is continued");
8 indexedDBTest(prepareDatabase
, onOpen
);
10 function prepareDatabase(evt
)
13 evalAndLog("db = event.target.result");
14 evalAndLog("store = db.createObjectStore('store')");
15 store
.put("value", "key");
21 evalAndLog("db = event.target.result");
22 evalAndLog("tx = db.transaction('store')");
23 evalAndLog("store = tx.objectStore('store')");
25 evalAndLog("cursorRequest = store.openCursor()");
26 cursorRequest
.onsuccess
= function cursorRequestSuccess(evt
) {
28 if (!cursorRequest
.result
)
31 evalAndLog("cursor = cursorRequest.result");
32 evalAndLog("cursor.continue()");
33 evalAndExpectException("cursorRequest.result", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); };
35 tx
.oncomplete
= finishJSTest
;