1 Test IndexedDB's KeyRange.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS 'lower' in IDBKeyRange is false
7 PASS 'upper' in IDBKeyRange is false
8 PASS 'lowerOpen' in IDBKeyRange is false
9 PASS 'upperOpen' in IDBKeyRange is false
10 PASS 'only' in IDBKeyRange is true
11 PASS 'lowerBound' in IDBKeyRange is true
12 PASS 'upperBound' in IDBKeyRange is true
13 PASS 'bound' in IDBKeyRange is true
15 instance = IDBKeyRange.only(1)
16 PASS 'lower' in instance is true
17 PASS 'upper' in instance is true
18 PASS 'lowerOpen' in instance is true
19 PASS 'upperOpen' in instance is true
20 PASS 'only' in instance is false
21 PASS 'lowerBound' in instance is false
22 PASS 'upperBound' in instance is false
23 PASS 'bound' in instance is false
26 PASS keyRange.lower is 1
27 PASS keyRange.upper is 1
28 PASS keyRange.lowerOpen is false
29 PASS keyRange.upperOpen is false
30 IDBKeyRange.only(3.14)
31 PASS keyRange.lower is 3.14
32 PASS keyRange.upper is 3.14
33 PASS keyRange.lowerOpen is false
34 PASS keyRange.upperOpen is false
36 PASS keyRange.lower is 'a'
37 PASS keyRange.upper is 'a'
38 PASS keyRange.lowerOpen is false
39 PASS keyRange.upperOpen is false
40 IDBKeyRange.lowerBound(10,true)
41 PASS keyRange.lower is 10
42 PASS keyRange.lowerOpen is true
43 PASS keyRange.upper is undefined.
44 PASS keyRange.upperOpen is true
45 IDBKeyRange.lowerBound(11,false)
46 PASS keyRange.lower is 11
47 PASS keyRange.lowerOpen is false
48 PASS keyRange.upper is undefined.
49 PASS keyRange.upperOpen is true
50 IDBKeyRange.lowerBound(12,undefined)
51 PASS keyRange.lower is 12
52 PASS keyRange.lowerOpen is false
53 PASS keyRange.upper is undefined.
54 PASS keyRange.upperOpen is true
55 IDBKeyRange.lowerBound(10.1,true)
56 PASS keyRange.lower is 10.1
57 PASS keyRange.lowerOpen is true
58 PASS keyRange.upper is undefined.
59 PASS keyRange.upperOpen is true
60 IDBKeyRange.lowerBound(11.2,false)
61 PASS keyRange.lower is 11.2
62 PASS keyRange.lowerOpen is false
63 PASS keyRange.upper is undefined.
64 PASS keyRange.upperOpen is true
65 IDBKeyRange.lowerBound(12.3,undefined)
66 PASS keyRange.lower is 12.3
67 PASS keyRange.lowerOpen is false
68 PASS keyRange.upper is undefined.
69 PASS keyRange.upperOpen is true
70 IDBKeyRange.lowerBound('aa',true)
71 PASS keyRange.lower is 'aa'
72 PASS keyRange.lowerOpen is true
73 PASS keyRange.upper is undefined.
74 PASS keyRange.upperOpen is true
75 IDBKeyRange.lowerBound('ab',false)
76 PASS keyRange.lower is 'ab'
77 PASS keyRange.lowerOpen is false
78 PASS keyRange.upper is undefined.
79 PASS keyRange.upperOpen is true
80 IDBKeyRange.lowerBound('ac',undefined)
81 PASS keyRange.lower is 'ac'
82 PASS keyRange.lowerOpen is false
83 PASS keyRange.upper is undefined.
84 PASS keyRange.upperOpen is true
85 IDBKeyRange.upperBound(20,true)
86 PASS keyRange.upper is 20
87 PASS keyRange.upperOpen is true
88 PASS keyRange.lower is undefined.
89 PASS keyRange.lowerOpen is true
90 IDBKeyRange.upperBound(21,false)
91 PASS keyRange.upper is 21
92 PASS keyRange.upperOpen is false
93 PASS keyRange.lower is undefined.
94 PASS keyRange.lowerOpen is true
95 IDBKeyRange.upperBound(22,undefined)
96 PASS keyRange.upper is 22
97 PASS keyRange.upperOpen is false
98 PASS keyRange.lower is undefined.
99 PASS keyRange.lowerOpen is true
100 IDBKeyRange.upperBound(20.2,true)
101 PASS keyRange.upper is 20.2
102 PASS keyRange.upperOpen is true
103 PASS keyRange.lower is undefined.
104 PASS keyRange.lowerOpen is true
105 IDBKeyRange.upperBound(21.3,false)
106 PASS keyRange.upper is 21.3
107 PASS keyRange.upperOpen is false
108 PASS keyRange.lower is undefined.
109 PASS keyRange.lowerOpen is true
110 IDBKeyRange.upperBound(22.4,undefined)
111 PASS keyRange.upper is 22.4
112 PASS keyRange.upperOpen is false
113 PASS keyRange.lower is undefined.
114 PASS keyRange.lowerOpen is true
115 IDBKeyRange.upperBound('ba',true)
116 PASS keyRange.upper is 'ba'
117 PASS keyRange.upperOpen is true
118 PASS keyRange.lower is undefined.
119 PASS keyRange.lowerOpen is true
120 IDBKeyRange.upperBound('bb',false)
121 PASS keyRange.upper is 'bb'
122 PASS keyRange.upperOpen is false
123 PASS keyRange.lower is undefined.
124 PASS keyRange.lowerOpen is true
125 IDBKeyRange.upperBound('bc',undefined)
126 PASS keyRange.upper is 'bc'
127 PASS keyRange.upperOpen is false
128 PASS keyRange.lower is undefined.
129 PASS keyRange.lowerOpen is true
130 IDBKeyRange.bound(30,40, undefined, undefined)
131 PASS keyRange.lower is 30
132 PASS keyRange.upper is 40
133 PASS keyRange.lowerOpen is false
134 PASS keyRange.upperOpen is false
135 IDBKeyRange.bound(31,41, false, false)
136 PASS keyRange.lower is 31
137 PASS keyRange.upper is 41
138 PASS keyRange.lowerOpen is false
139 PASS keyRange.upperOpen is false
140 IDBKeyRange.bound(32,42, false, true)
141 PASS keyRange.lower is 32
142 PASS keyRange.upper is 42
143 PASS keyRange.lowerOpen is false
144 PASS keyRange.upperOpen is true
145 IDBKeyRange.bound(33,43, true, false)
146 PASS keyRange.lower is 33
147 PASS keyRange.upper is 43
148 PASS keyRange.lowerOpen is true
149 PASS keyRange.upperOpen is false
150 IDBKeyRange.bound(34,44, true, true)
151 PASS keyRange.lower is 34
152 PASS keyRange.upper is 44
153 PASS keyRange.lowerOpen is true
154 PASS keyRange.upperOpen is true
155 IDBKeyRange.bound(30.1,40.2, undefined, undefined)
156 PASS keyRange.lower is 30.1
157 PASS keyRange.upper is 40.2
158 PASS keyRange.lowerOpen is false
159 PASS keyRange.upperOpen is false
160 IDBKeyRange.bound(31.3,41.4, false, false)
161 PASS keyRange.lower is 31.3
162 PASS keyRange.upper is 41.4
163 PASS keyRange.lowerOpen is false
164 PASS keyRange.upperOpen is false
165 IDBKeyRange.bound(32.5,42.6, false, true)
166 PASS keyRange.lower is 32.5
167 PASS keyRange.upper is 42.6
168 PASS keyRange.lowerOpen is false
169 PASS keyRange.upperOpen is true
170 IDBKeyRange.bound(33.7,43.8, true, false)
171 PASS keyRange.lower is 33.7
172 PASS keyRange.upper is 43.8
173 PASS keyRange.lowerOpen is true
174 PASS keyRange.upperOpen is false
175 IDBKeyRange.bound(34.9,44, true, true)
176 PASS keyRange.lower is 34.9
177 PASS keyRange.upper is 44
178 PASS keyRange.lowerOpen is true
179 PASS keyRange.upperOpen is true
180 IDBKeyRange.bound('aaa','aba', false, false)
181 PASS keyRange.lower is 'aaa'
182 PASS keyRange.upper is 'aba'
183 PASS keyRange.lowerOpen is false
184 PASS keyRange.upperOpen is false
185 IDBKeyRange.bound('aab','abb', undefined, undefined)
186 PASS keyRange.lower is 'aab'
187 PASS keyRange.upper is 'abb'
188 PASS keyRange.lowerOpen is false
189 PASS keyRange.upperOpen is false
190 IDBKeyRange.bound('aac','abc', false, false)
191 PASS keyRange.lower is 'aac'
192 PASS keyRange.upper is 'abc'
193 PASS keyRange.lowerOpen is false
194 PASS keyRange.upperOpen is false
195 IDBKeyRange.bound('aad','abd', false, true)
196 PASS keyRange.lower is 'aad'
197 PASS keyRange.upper is 'abd'
198 PASS keyRange.lowerOpen is false
199 PASS keyRange.upperOpen is true
200 IDBKeyRange.bound('aae','abe', true, false)
201 PASS keyRange.lower is 'aae'
202 PASS keyRange.upper is 'abe'
203 PASS keyRange.lowerOpen is true
204 PASS keyRange.upperOpen is false
205 IDBKeyRange.bound('aaf','abf', true, true)
206 PASS keyRange.lower is 'aaf'
207 PASS keyRange.upper is 'abf'
208 PASS keyRange.lowerOpen is true
209 PASS keyRange.upperOpen is true
210 Passing an invalid key into only({})
211 Expecting exception from IDBKeyRange.only({})
212 PASS Exception was thrown.
214 PASS ename is 'DataError'
215 Exception message: Failed to execute 'only' on 'IDBKeyRange': The parameter is not a valid key.
216 Passing an invalid key into upperBound({})
217 Expecting exception from IDBKeyRange.upperBound({})
218 PASS Exception was thrown.
220 PASS ename is 'DataError'
221 Exception message: Failed to execute 'upperBound' on 'IDBKeyRange': The parameter is not a valid key.
222 Passing an invalid key into lowerBound({})
223 Expecting exception from IDBKeyRange.lowerBound({})
224 PASS Exception was thrown.
226 PASS ename is 'DataError'
227 Exception message: Failed to execute 'lowerBound' on 'IDBKeyRange': The parameter is not a valid key.
228 Passing an invalid key into bound(null, {})
229 Expecting exception from IDBKeyRange.bound(null, {})
230 PASS Exception was thrown.
232 PASS ename is 'DataError'
233 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.
234 Passing an invalid key into bound({},null)
235 Expecting exception from IDBKeyRange.bound({}, null)
236 PASS Exception was thrown.
238 PASS ename is 'DataError'
239 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.
240 Passing an invalid key into bound({}, {})
241 Expecting exception from IDBKeyRange.bound({}, {})
242 PASS Exception was thrown.
244 PASS ename is 'DataError'
245 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.
246 Lower key greater than higher key, bound(4, 3)
247 Expecting exception from IDBKeyRange.bound(4, 3)
248 PASS Exception was thrown.
250 PASS ename is 'DataError'
251 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The lower key is greater than the upper key.
252 Equal keys, either of the bounds is open, bound(4, 4, true, false)
253 Expecting exception from IDBKeyRange.bound(4, 4, true, false)
254 PASS Exception was thrown.
256 PASS ename is 'DataError'
257 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The lower key and upper key are equal and one of the bounds is open.
258 Equal keys, either of the bounds is open, bound(4, 4, false, true)
259 Expecting exception from IDBKeyRange.bound(4, 4, false, true)
260 PASS Exception was thrown.
262 PASS ename is 'DataError'
263 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The lower key and upper key are equal and one of the bounds is open.
264 Equal keys, either of the bounds is open, bound(4, 4, true, true)
265 Expecting exception from IDBKeyRange.bound(4, 4, true, true)
266 PASS Exception was thrown.
268 PASS ename is 'DataError'
269 Exception message: Failed to execute 'bound' on 'IDBKeyRange': The lower key and upper key are equal and one of the bounds is open.
270 Equal keys, none of the bounds is open, bound(4, 4, false, false)
271 PASS successfullyParsed is true