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 odd value datatypes"); | 6 description("Test IndexedDB odd value datatypes"); |
7 | 7 |
8 function test() | 8 function test() |
9 { | 9 { |
10 removeVendorPrefixes(); | |
11 | |
12 testData = [{ description: 'empty string', name: '' }, | 10 testData = [{ description: 'empty string', name: '' }, |
13 { description: 'null', name: '\u0000' }, | 11 { description: 'null', name: '\u0000' }, |
14 { description: 'faihu', name: '\ud800\udf46' }, | 12 { description: 'faihu', name: '\ud800\udf46' }, |
15 { description: 'unpaired surrogate', name: '\ud800' }, | 13 { description: 'unpaired surrogate', name: '\ud800' }, |
16 { description: 'fffe', name: '\ufffe' }, | 14 { description: 'fffe', name: '\ufffe' }, |
17 { description: 'ffff', name: '\uffff' }, | 15 { description: 'ffff', name: '\uffff' }, |
18 { description: 'line separator', name: '\u2028' } | 16 { description: 'line separator', name: '\u2028' } |
19 ]; | 17 ]; |
20 nextToOpen = 0; | 18 nextToOpen = 0; |
21 openNextDatabase(); | 19 openNextDatabase(); |
22 } | 20 } |
23 | 21 |
24 function openNextDatabase() | 22 function openNextDatabase() |
25 { | 23 { |
26 debug("opening a database named " + testData[nextToOpen].description); | 24 debug("opening a database named " + testData[nextToOpen].description); |
27 request = evalAndLog("indexedDB.open(testData[nextToOpen].name)"); | 25 request = evalAndLog("indexedDB.open(testData[nextToOpen].name)"); |
28 request.onerror = unexpectedErrorCallback; | 26 request.onerror = unexpectedErrorCallback; |
29 request.onsuccess = ++nextToOpen < testData.length ? openNextDatabase : fini
shJSTest; | 27 request.onsuccess = ++nextToOpen < testData.length ? openNextDatabase : fini
shJSTest; |
30 } | 28 } |
31 | 29 |
32 test(); | 30 test(); |
OLD | NEW |