| <title>IDBObjectStore.add() - autoIncrement and inline keys </title> |
| <link rel="author" title="Microsoft" href="http://www.microsoft.com"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="support.js"></script> |
| record = { property: "data" }, |
| expected_keys = [ 1, 2, 3, 4 ]; |
| var open_rq = createdb(t); |
| open_rq.onupgradeneeded = function(e) { |
| var objStore = db.createObjectStore("store", { keyPath: "key", autoIncrement: true }); |
| open_rq.onsuccess = function(e) { |
| rq = db.transaction("store") |
| rq.onsuccess = t.step_func(function(e) { |
| var cursor = e.target.result; |
| actual_keys.push(cursor.value.key); |
| assert_array_equals(actual_keys, expected_keys); |