| OLD | NEW |
| 1 var databaseName = "database"; | 1 var databaseName = "database"; |
| 2 var databaseVersion = 1; | 2 var databaseVersion = 1; |
| 3 | 3 |
| 4 if (!window.indexedDB) | |
| 5 { | |
| 6 if (window.msIndexedDB) | |
| 7 { | |
| 8 window.indexedDB = window.msIndexedDB; | |
| 9 } | |
| 10 else if (window.mozIndexedDB) | |
| 11 { | |
| 12 window.indexedDB = window.mozIndexedDB; | |
| 13 } | |
| 14 else if (window.webkitIndexedDB) | |
| 15 { | |
| 16 window.indexedDB = webkitIndexedDB; | |
| 17 IDBCursor = webkitIDBCursor; | |
| 18 IDBDatabaseException = webkitIDBDatabaseException; | |
| 19 IDBIndex = webkitIDBIndex; | |
| 20 IDBObjectStore = webkitIDBObjectStore; | |
| 21 IDBRequest = webkitIDBRequest; | |
| 22 IDBKeyRange = webkitIDBKeyRange; | |
| 23 IDBTransaction = webkitIDBTransaction; | |
| 24 } | |
| 25 } | |
| 26 | |
| 27 /* Delete created databases | 4 /* Delete created databases |
| 28 * | 5 * |
| 29 * Go through each finished test, see if it has an associated database. Close | 6 * Go through each finished test, see if it has an associated database. Close |
| 30 * that and delete the database. */ | 7 * that and delete the database. */ |
| 31 add_completion_callback(function(tests) | 8 add_completion_callback(function(tests) |
| 32 { | 9 { |
| 33 for (var i in tests) | 10 for (var i in tests) |
| 34 { | 11 { |
| 35 if(tests[i].db) | 12 if(tests[i].db) |
| 36 { | 13 { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return this; | 94 return this; |
| 118 } | 95 } |
| 119 }); | 96 }); |
| 120 | 97 |
| 121 return rq_open; | 98 return rq_open; |
| 122 } | 99 } |
| 123 | 100 |
| 124 function assert_key_equals(actual, expected, description) { | 101 function assert_key_equals(actual, expected, description) { |
| 125 assert_equals(indexedDB.cmp(actual, expected), 0, description); | 102 assert_equals(indexedDB.cmp(actual, expected), 0, description); |
| 126 } | 103 } |
| OLD | NEW |