| OLD | NEW |
| 1 if (this.importScripts) { | 1 if (this.importScripts) { |
| 2 importScripts('../../../resources/js-test.js'); | 2 importScripts('../../../resources/js-test.js'); |
| 3 importScripts('shared.js'); | 3 importScripts('shared.js'); |
| 4 } | 4 } |
| 5 | 5 |
| 6 description("Test IndexedDB's KeyRange."); | 6 description("Test IndexedDB's KeyRange."); |
| 7 | 7 |
| 8 function checkSingleKeyRange(value) | 8 function checkSingleKeyRange(value) |
| 9 { | 9 { |
| 10 keyRange = evalAndLog("IDBKeyRange.only(" + value + ")"); | 10 keyRange = evalAndLog("IDBKeyRange.only(" + value + ")"); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 if (lowerOpen === undefined) | 44 if (lowerOpen === undefined) |
| 45 lowerOpen = false; | 45 lowerOpen = false; |
| 46 if (upperOpen === undefined) | 46 if (upperOpen === undefined) |
| 47 upperOpen = false; | 47 upperOpen = false; |
| 48 shouldBe("keyRange.lowerOpen", "" + lowerOpen); | 48 shouldBe("keyRange.lowerOpen", "" + lowerOpen); |
| 49 shouldBe("keyRange.upperOpen", "" + upperOpen); | 49 shouldBe("keyRange.upperOpen", "" + upperOpen); |
| 50 } | 50 } |
| 51 | 51 |
| 52 function test() | 52 function test() |
| 53 { | 53 { |
| 54 removeVendorPrefixes(); | |
| 55 shouldBeFalse("'lower' in IDBKeyRange"); | 54 shouldBeFalse("'lower' in IDBKeyRange"); |
| 56 shouldBeFalse("'upper' in IDBKeyRange"); | 55 shouldBeFalse("'upper' in IDBKeyRange"); |
| 57 shouldBeFalse("'lowerOpen' in IDBKeyRange"); | 56 shouldBeFalse("'lowerOpen' in IDBKeyRange"); |
| 58 shouldBeFalse("'upperOpen' in IDBKeyRange"); | 57 shouldBeFalse("'upperOpen' in IDBKeyRange"); |
| 59 shouldBeTrue("'only' in IDBKeyRange"); | 58 shouldBeTrue("'only' in IDBKeyRange"); |
| 60 shouldBeTrue("'lowerBound' in IDBKeyRange"); | 59 shouldBeTrue("'lowerBound' in IDBKeyRange"); |
| 61 shouldBeTrue("'upperBound' in IDBKeyRange"); | 60 shouldBeTrue("'upperBound' in IDBKeyRange"); |
| 62 shouldBeTrue("'bound' in IDBKeyRange"); | 61 shouldBeTrue("'bound' in IDBKeyRange"); |
| 63 | 62 |
| 64 debug(""); | 63 debug(""); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 debug("Equal keys, either of the bounds is open, bound(4, 4, true, true)"); | 147 debug("Equal keys, either of the bounds is open, bound(4, 4, true, true)"); |
| 149 evalAndExpectException("IDBKeyRange.bound(4, 4, true, true)", "0", "'DataErr
or'"); | 148 evalAndExpectException("IDBKeyRange.bound(4, 4, true, true)", "0", "'DataErr
or'"); |
| 150 | 149 |
| 151 debug("Equal keys, none of the bounds is open, bound(4, 4, false, false)"); | 150 debug("Equal keys, none of the bounds is open, bound(4, 4, false, false)"); |
| 152 IDBKeyRange.bound(4, 4, false, false); | 151 IDBKeyRange.bound(4, 4, false, false); |
| 153 } | 152 } |
| 154 | 153 |
| 155 test(); | 154 test(); |
| 156 | 155 |
| 157 finishJSTest(); | 156 finishJSTest(); |
| OLD | NEW |