3 <title>IDBIndex.count() - returns the number of records that have keys within the range
</title>
4 <link rel=
"author" title=
"Microsoft" href=
"http://www.microsoft.com">
5 <script src=../../../resources/testharness.js
></script>
6 <script src=../../../resources/testharnessreport.js
></script>
7 <script src=support.js
></script>
10 var db
, t
= async_test();
12 var open_rq
= createdb(t
);
14 open_rq
.onupgradeneeded = function(e
) {
16 var store
= db
.createObjectStore("store", { autoIncrement
: true });
17 store
.createIndex("index", "indexedProperty");
19 for(var i
= 0; i
< 10; i
++) {
20 store
.add({ indexedProperty
: "data" + i
});
24 open_rq
.onsuccess = function(e
) {
25 var rq
= db
.transaction("store")
28 .count(IDBKeyRange
.bound('data0', 'data4'));
30 rq
.onsuccess
= t
.step_func(function(e
) {
31 assert_equals(e
.target
.result
, 5);