| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../http/tests/inspector/inspector-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function populateDOMStorage() | 6 function populateDOMStorage() |
| 7 { | 7 { |
| 8 localStorage.clear(); | 8 localStorage.clear(); |
| 9 sessionStorage.clear(); | 9 sessionStorage.clear(); |
| 10 localStorage["resource-history"] = "{}"; // This mitigates file:// localstor
age conflict. | 10 localStorage["resource-history"] = "{}"; // This mitigates file:// localstor
age conflict. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 rows.sort(); | 39 rows.sort(); |
| 40 InspectorTest.addResult("KeyValue pairs: " + rows.join('')); | 40 InspectorTest.addResult("KeyValue pairs: " + rows.join('')); |
| 41 } | 41 } |
| 42 | 42 |
| 43 InspectorTest.runAfterPendingDispatches(function() { | 43 InspectorTest.runAfterPendingDispatches(function() { |
| 44 var storages = WebInspector.domStorageModel.storages(); | 44 var storages = WebInspector.domStorageModel.storages(); |
| 45 if (storages) { | 45 if (storages) { |
| 46 for (var i = 0; i < storages.length; i++) { | 46 for (var i = 0; i < storages.length; i++) { |
| 47 var storage = storages[i]; | 47 var storage = storages[i]; |
| 48 WebInspector.panels.resources._showDOMStorage(storage); | 48 WebInspector.inspectorView.panel("resources")._showDOMStorage(st
orage); |
| 49 InspectorTest.addResult("Did show: " + name(storage)); | 49 InspectorTest.addResult("Did show: " + name(storage)); |
| 50 } | 50 } |
| 51 } else | 51 } else |
| 52 InspectorTest.addResult("FAIL: no DOM storages found."); | 52 InspectorTest.addResult("FAIL: no DOM storages found."); |
| 53 | 53 |
| 54 InspectorTest.runAfterPendingDispatches(function() { | 54 InspectorTest.runAfterPendingDispatches(function() { |
| 55 var storages = WebInspector.domStorageModel.storages(); | 55 var storages = WebInspector.domStorageModel.storages(); |
| 56 for (var i = 0; i < storages.length; i++) { | 56 for (var i = 0; i < storages.length; i++) { |
| 57 var storage = storages[i]; | 57 var storage = storages[i]; |
| 58 InspectorTest.addResult(name(storage) + " content: "); | 58 InspectorTest.addResult(name(storage) + " content: "); |
| 59 var view = WebInspector.panels.resources._domStorageViews.get(st
orage); | 59 var view = WebInspector.inspectorView.panel("resources")._domSto
rageViews.get(storage); |
| 60 dumpDataGridContent(view._dataGrid); | 60 dumpDataGridContent(view._dataGrid); |
| 61 } | 61 } |
| 62 InspectorTest.addResult("DONE"); | 62 InspectorTest.addResult("DONE"); |
| 63 InspectorTest.completeTest(); | 63 InspectorTest.completeTest(); |
| 64 }); | 64 }); |
| 65 }); | 65 }); |
| 66 } | 66 } |
| 67 | 67 |
| 68 </script> | 68 </script> |
| 69 </head> | 69 </head> |
| 70 | 70 |
| 71 <body onload="runTest()"> | 71 <body onload="runTest()"> |
| 72 <p> | 72 <p> |
| 73 Test that storage panel is present and that it contains correct data for local a
nd session DOM storages. | 73 Test that storage panel is present and that it contains correct data for local a
nd session DOM storages. |
| 74 </p> | 74 </p> |
| 75 | 75 |
| 76 </body> | 76 </body> |
| 77 </html> | 77 </html> |
| OLD | NEW |