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 mainFrameId = WebInspector.resourceTreeModel.mainFrame.id; | 8 var mainFrameId = WebInspector.resourceTreeModel.mainFrame.id; |
9 var indexedDBModel; | 9 var indexedDBModel; |
10 var withoutIndexedDBURL = "http://localhost:8000/inspector/indexeddb/resourc
es/without-indexed-db.html"; | 10 var withoutIndexedDBURL = "http://localhost:8000/inspector/indexeddb/resourc
es/without-indexed-db.html"; |
(...skipping 25 matching lines...) Expand all Loading... |
36 { | 36 { |
37 InspectorTest.deleteObjectStore(mainFrameId, databaseName, objectSto
reName, step3); | 37 InspectorTest.deleteObjectStore(mainFrameId, databaseName, objectSto
reName, step3); |
38 } | 38 } |
39 | 39 |
40 function step3() | 40 function step3() |
41 { | 41 { |
42 InspectorTest.deleteDatabase(mainFrameId, databaseName, callback); | 42 InspectorTest.deleteDatabase(mainFrameId, databaseName, callback); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 WebInspector.showPanel("resources"); | 46 // Load panel to install listeners. |
| 47 WebInspector.panel("resources"); |
47 | 48 |
48 InspectorTest.addSniffer(WebInspector.IndexedDBTreeElement.prototype, "_inde
xedDBAdded", indexedDBAdded, true); | 49 InspectorTest.addSniffer(WebInspector.IndexedDBTreeElement.prototype, "_inde
xedDBAdded", indexedDBAdded, true); |
49 function indexedDBAdded() | 50 function indexedDBAdded() |
50 { | 51 { |
51 InspectorTest.addResult("Database added."); | 52 InspectorTest.addResult("Database added."); |
52 } | 53 } |
53 | 54 |
54 InspectorTest.addSniffer(WebInspector.IndexedDBTreeElement.prototype, "_inde
xedDBRemoved", indexedDBRemoved, true); | 55 InspectorTest.addSniffer(WebInspector.IndexedDBTreeElement.prototype, "_inde
xedDBRemoved", indexedDBRemoved, true); |
55 function indexedDBRemoved() | 56 function indexedDBRemoved() |
56 { | 57 { |
57 InspectorTest.addResult("Database removed."); | 58 InspectorTest.addResult("Database removed."); |
58 } | 59 } |
59 | 60 |
60 InspectorTest.addSniffer(WebInspector.IndexedDBTreeElement.prototype, "_inde
xedDBLoaded", indexedDBLoaded, true); | 61 InspectorTest.addSniffer(WebInspector.IndexedDBTreeElement.prototype, "_inde
xedDBLoaded", indexedDBLoaded, true); |
61 function indexedDBLoaded() | 62 function indexedDBLoaded() |
62 { | 63 { |
63 InspectorTest.addResult("Database loaded."); | 64 InspectorTest.addResult("Database loaded."); |
64 } | 65 } |
65 | 66 |
| 67 WebInspector.showPanel("resources"); |
| 68 |
66 InspectorTest.addResult("Expanded IndexedDB tree element."); | 69 InspectorTest.addResult("Expanded IndexedDB tree element."); |
67 WebInspector.panels.resources.indexedDBListTreeElement.expand(); | 70 WebInspector.panels.resources.indexedDBListTreeElement.expand(); |
68 | 71 |
69 InspectorTest.addSniffer(WebInspector.IndexedDBModel.prototype, "_updateOrig
inDatabaseNames", indexedDBTreeElementExpanded, false); | 72 InspectorTest.addSniffer(WebInspector.IndexedDBModel.prototype, "_updateOrig
inDatabaseNames", indexedDBTreeElementExpanded, false); |
70 function indexedDBTreeElementExpanded() | 73 function indexedDBTreeElementExpanded() |
71 { | 74 { |
72 InspectorTest.dumpIndexedDBTree(); | 75 InspectorTest.dumpIndexedDBTree(); |
73 InspectorTest.addResult("Created database."); | 76 InspectorTest.addResult("Created database."); |
74 createDatabase(databaseCreated); | 77 createDatabase(databaseCreated); |
75 } | 78 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 InspectorTest.completeTest(); | 119 InspectorTest.completeTest(); |
117 } | 120 } |
118 } | 121 } |
119 | 122 |
120 </script> | 123 </script> |
121 </head> | 124 </head> |
122 <body onload="runTest()"> | 125 <body onload="runTest()"> |
123 <p>Tests IndexedDB tree element on resources panel.</p> | 126 <p>Tests IndexedDB tree element on resources panel.</p> |
124 </body> | 127 </body> |
125 </html> | 128 </html> |
OLD | NEW |