| 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 src="../http/tests/inspector/resources-test.js"></script> | 4 <script src="../http/tests/inspector/resources-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function populateDOMStorage() | 7 function populateDOMStorage() |
| 8 { | 8 { |
| 9 localStorage.clear(); | 9 localStorage.clear(); |
| 10 sessionStorage.clear(); | 10 sessionStorage.clear(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 InspectorTest.addResult("KeyValue pairs: " + rows.join('')); | 39 InspectorTest.addResult("KeyValue pairs: " + rows.join('')); |
| 40 } | 40 } |
| 41 | 41 |
| 42 function testStorageInView(storages) { | 42 function testStorageInView(storages) { |
| 43 var storage = storages.shift(); | 43 var storage = storages.shift(); |
| 44 if (!storage) { | 44 if (!storage) { |
| 45 InspectorTest.addResult("DONE"); | 45 InspectorTest.addResult("DONE"); |
| 46 InspectorTest.completeTest(); | 46 InspectorTest.completeTest(); |
| 47 return; | 47 return; |
| 48 } | 48 } |
| 49 UI.panels.resources._showDOMStorage(storage); | 49 UI.panels.resources.showDOMStorage(storage); |
| 50 InspectorTest.addResult("Did show: " + name(storage)); | 50 InspectorTest.addResult("Did show: " + name(storage)); |
| 51 InspectorTest.deprecatedRunAfterPendingDispatches(function() { | 51 InspectorTest.deprecatedRunAfterPendingDispatches(function() { |
| 52 InspectorTest.addResult(name(storage) + " content: "); | 52 InspectorTest.addResult(name(storage) + " content: "); |
| 53 var view = UI.panels.resources._domStorageView; | 53 var view = UI.panels.resources._domStorageView; |
| 54 dumpDataGridContent(view._dataGrid); | 54 dumpDataGridContent(view._dataGrid); |
| 55 InspectorTest.deprecatedRunAfterPendingDispatches(() => testStorageI
nView(storages)); | 55 InspectorTest.deprecatedRunAfterPendingDispatches(() => testStorageI
nView(storages)); |
| 56 }); | 56 }); |
| 57 } | 57 } |
| 58 | 58 |
| 59 InspectorTest.deprecatedRunAfterPendingDispatches(function() { | 59 InspectorTest.deprecatedRunAfterPendingDispatches(function() { |
| 60 var storages = InspectorTest.domStorageModel().storages(); | 60 var storages = InspectorTest.domStorageModel().storages(); |
| 61 if (storages) | 61 if (storages) |
| 62 testStorageInView(storages.slice()); | 62 testStorageInView(storages.slice()); |
| 63 else | 63 else |
| 64 InspectorTest.addResult("FAIL: no DOM storages found."); | 64 InspectorTest.addResult("FAIL: no DOM storages found."); |
| 65 | 65 |
| 66 }); | 66 }); |
| 67 } | 67 } |
| 68 | 68 |
| 69 </script> | 69 </script> |
| 70 </head> | 70 </head> |
| 71 | 71 |
| 72 <body onload="runTest()"> | 72 <body onload="runTest()"> |
| 73 <p> | 73 <p> |
| 74 Test that storage panel is present and that it contains correct data for local a
nd session DOM storages. | 74 Test that storage panel is present and that it contains correct data for local a
nd session DOM storages. |
| 75 </p> | 75 </p> |
| 76 | 76 |
| 77 </body> | 77 </body> |
| 78 </html> | 78 </html> |
| OLD | NEW |