| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="indexeddb-test.js"></script> | 4 <script src="indexeddb-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange; | 8 var IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange; |
| 9 var indexedDBModel = new WebInspector.IndexedDBModel(); | 9 var indexedDBModel = new WebInspector.IndexedDBModel(); |
| 10 var mainFrameId = WebInspector.resourceTreeModel.mainFrame.id; | 10 var mainFrameId = WebInspector.resourceTreeModel.mainFrame.id; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 var entry; | 48 var entry; |
| 49 dumpEntries(); | 49 dumpEntries(); |
| 50 | 50 |
| 51 function dumpEntries() | 51 function dumpEntries() |
| 52 { | 52 { |
| 53 if (index === entries.length) { | 53 if (index === entries.length) { |
| 54 InspectorTest.addResult(" hasMore = " + hasMore); | 54 InspectorTest.addResult(" hasMore = " + hasMore); |
| 55 callback(); | 55 callback(); |
| 56 return; | 56 return; |
| 57 } | 57 } |
| 58 entry = entries[index]; | 58 entry = entries[index++]; |
| 59 entry.value.callFunctionJSON(dumpMe, undefined, dumped.bind(this
)); | 59 entry.value.callFunctionJSON(dumpMe, undefined, dumped.bind(this
)); |
| 60 ++index; | |
| 61 } | 60 } |
| 62 | 61 |
| 63 function dumpMe() | 62 function dumpMe() |
| 64 { | 63 { |
| 65 return "{\"key\":\"" + this.key + "\",\"value\":\"" + this.value
+ "\"}"; | 64 return "{\"key\":\"" + this.key + "\",\"value\":\"" + this.value
+ "\"}"; |
| 66 } | 65 } |
| 67 | 66 |
| 68 function dumped(value) | 67 function dumped(value) |
| 69 { | 68 { |
| 70 InspectorTest.addResult(" Key = " + entry.key.description + "
, primaryKey = " + entry.primaryKey.description + ", value = " + value); | 69 InspectorTest.addResult(" Key = " + entry.key.description + "
, primaryKey = " + entry.primaryKey.description + ", value = " + value); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 InspectorTest.completeTest(); | 219 InspectorTest.completeTest(); |
| 221 } | 220 } |
| 222 } | 221 } |
| 223 } | 222 } |
| 224 </script> | 223 </script> |
| 225 </head> | 224 </head> |
| 226 <body onload="runTest()"> | 225 <body onload="runTest()"> |
| 227 <p>Tests that data is correctly loaded by IndexedDBModel from IndexedDB object s
tore and index.</p> | 226 <p>Tests that data is correctly loaded by IndexedDBModel from IndexedDB object s
tore and index.</p> |
| 228 </body> | 227 </body> |
| 229 </html> | 228 </html> |
| OLD | NEW |