OLD | NEW |
1 Test the basics of IndexedDB's webkitIDBIndex. | 1 Test the basics of IndexedDB's webkitIDBIndex. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 webkitIndexedDB.open('name') | 6 webkitIndexedDB.open('name') |
7 PASS 'onsuccess' in result is true | 7 PASS 'onsuccess' in result is true |
8 PASS 'onerror' in result is true | 8 PASS 'onerror' in result is true |
9 PASS 'readyState' in result is true | 9 PASS 'readyState' in result is true |
10 An event should fire shortly... | 10 An event should fire shortly... |
(...skipping 27 matching lines...) Expand all Loading... |
38 PASS 'onerror' in event.target is true | 38 PASS 'onerror' in event.target is true |
39 PASS 'readyState' in event.target is true | 39 PASS 'readyState' in event.target is true |
40 PASS event.target.readyState is event.target.DONE | 40 PASS event.target.readyState is event.target.DONE |
41 | 41 |
42 trans = event.result | 42 trans = event.result |
43 PASS trans !== null is true | 43 PASS trans !== null is true |
44 Deleted all object stores. | 44 Deleted all object stores. |
45 db.createObjectStore('storeName', null) | 45 db.createObjectStore('storeName', null) |
46 store.createIndex('indexName', 'x') | 46 store.createIndex('indexName', 'x') |
47 store.createIndex('indexName2', 'y', false) | 47 store.createIndex('indexName2', 'y', false) |
| 48 store.createIndex('zIndex', 'z', true) |
48 PASS 'name' in indexObject is true | 49 PASS 'name' in indexObject is true |
49 PASS indexObject.name is "indexName" | 50 PASS indexObject.name is "indexName" |
50 PASS 'storeName' in indexObject is true | 51 PASS 'storeName' in indexObject is true |
51 PASS indexObject.storeName is "storeName" | 52 PASS indexObject.storeName is "storeName" |
52 PASS 'keyPath' in indexObject is true | 53 PASS 'keyPath' in indexObject is true |
53 PASS indexObject.keyPath is "x" | 54 PASS indexObject.keyPath is "x" |
54 PASS 'unique' in indexObject is true | 55 PASS 'unique' in indexObject is true |
55 PASS indexObject.unique is false | 56 PASS indexObject.unique is false |
56 PASS 'openKeyCursor' in indexObject is true | 57 PASS 'openKeyCursor' in indexObject is true |
57 PASS 'openCursor' in indexObject is true | 58 PASS 'openCursor' in indexObject is true |
58 PASS 'getKey' in indexObject is true | 59 PASS 'getKey' in indexObject is true |
59 PASS 'get' in indexObject is true | 60 PASS 'get' in indexObject is true |
60 store.add({x: 'value', y: 'zzz'}, 'key') | 61 store.add({x: 'value', y: 'zzz', z: 2.72}, 'key') |
61 PASS 'onsuccess' in result is true | 62 PASS 'onsuccess' in result is true |
62 PASS 'onerror' in result is true | 63 PASS 'onerror' in result is true |
63 PASS 'readyState' in result is true | 64 PASS 'readyState' in result is true |
64 An event should fire shortly... | 65 An event should fire shortly... |
65 | 66 |
66 Success event fired: | 67 Success event fired: |
67 PASS 'result' in event is true | 68 PASS 'result' in event is true |
68 PASS 'code' in event is false | 69 PASS 'code' in event is false |
69 PASS 'message' in event is false | 70 PASS 'message' in event is false |
70 PASS 'source' in event is true | 71 PASS 'source' in event is true |
71 PASS event.source != null is true | 72 PASS event.source != null is true |
72 PASS 'onsuccess' in event.target is true | 73 PASS 'onsuccess' in event.target is true |
73 PASS 'onerror' in event.target is true | 74 PASS 'onerror' in event.target is true |
74 PASS 'readyState' in event.target is true | 75 PASS 'readyState' in event.target is true |
75 PASS event.target.readyState is event.target.DONE | 76 PASS event.target.readyState is event.target.DONE |
76 | 77 |
77 event.source.add({x: 'value2', y: 'zzz2'}, 'key2') | 78 event.source.add({x: 'value2', y: 'zzz2', z: 2.71}, 'key2') |
78 PASS 'onsuccess' in result is true | 79 PASS 'onsuccess' in result is true |
79 PASS 'onerror' in result is true | 80 PASS 'onerror' in result is true |
80 PASS 'readyState' in result is true | 81 PASS 'readyState' in result is true |
81 An event should fire shortly... | 82 An event should fire shortly... |
82 | 83 |
83 Success event fired: | 84 Success event fired: |
84 PASS 'result' in event is true | 85 PASS 'result' in event is true |
85 PASS 'code' in event is false | 86 PASS 'code' in event is false |
86 PASS 'message' in event is false | 87 PASS 'message' in event is false |
87 PASS 'source' in event is true | 88 PASS 'source' in event is true |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 PASS 'code' in event is false | 121 PASS 'code' in event is false |
121 PASS 'message' in event is false | 122 PASS 'message' in event is false |
122 PASS 'source' in event is true | 123 PASS 'source' in event is true |
123 PASS event.source != null is true | 124 PASS event.source != null is true |
124 PASS 'onsuccess' in event.target is true | 125 PASS 'onsuccess' in event.target is true |
125 PASS 'onerror' in event.target is true | 126 PASS 'onerror' in event.target is true |
126 PASS 'readyState' in event.target is true | 127 PASS 'readyState' in event.target is true |
127 PASS event.target.readyState is event.target.DONE | 128 PASS event.target.readyState is event.target.DONE |
128 | 129 |
129 PASS event.result is "key" | 130 PASS event.result is "key" |
| 131 indexObject3.get(2.71) |
| 132 PASS 'onsuccess' in result is true |
| 133 PASS 'onerror' in result is true |
| 134 PASS 'readyState' in result is true |
| 135 An event should fire shortly... |
| 136 |
| 137 Success event fired: |
| 138 PASS 'result' in event is true |
| 139 PASS 'code' in event is false |
| 140 PASS 'message' in event is false |
| 141 PASS 'source' in event is true |
| 142 PASS event.source != null is true |
| 143 PASS 'onsuccess' in event.target is true |
| 144 PASS 'onerror' in event.target is true |
| 145 PASS 'readyState' in event.target is true |
| 146 PASS event.target.readyState is event.target.DONE |
| 147 |
| 148 PASS event.result.x is "value2" |
130 indexObject.get('value') | 149 indexObject.get('value') |
131 PASS 'onsuccess' in result is true | 150 PASS 'onsuccess' in result is true |
132 PASS 'onerror' in result is true | 151 PASS 'onerror' in result is true |
133 PASS 'readyState' in result is true | 152 PASS 'readyState' in result is true |
134 An event should fire shortly... | 153 An event should fire shortly... |
135 | 154 |
136 Success event fired: | 155 Success event fired: |
137 PASS 'result' in event is true | 156 PASS 'result' in event is true |
138 PASS 'code' in event is false | 157 PASS 'code' in event is false |
139 PASS 'message' in event is false | 158 PASS 'message' in event is false |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 320 |
302 PASS event.result === null is true | 321 PASS event.result === null is true |
303 Passing an invalid key into indexObject.get(). | 322 Passing an invalid key into indexObject.get(). |
304 PASS Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17 | 323 PASS Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17 |
305 Passing an invalid key into indexObject.getKey(). | 324 Passing an invalid key into indexObject.getKey(). |
306 PASS Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17 | 325 PASS Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17 |
307 PASS successfullyParsed is true | 326 PASS successfullyParsed is true |
308 | 327 |
309 TEST COMPLETE | 328 TEST COMPLETE |
310 | 329 |
OLD | NEW |